import sys

a,b = map(int,input().split())
d = b - a # 公差
c = b + d
print(f"{c}")