a,b = map(int, input().strip().split())

if a >b:
    print(b-(a-b))
else:
    print(a-(b-a))