a,b=map(int,input().split(' '))    # 确定a和b
gap=b-a    # 差值
print(b+gap)