a = input()
a = int(a)
s = input()
s = int(s)
b = 0
b = 2 * s - a
print(b)

675a748debbd7c408dafcc5eec0235eb4eb3dc76
<mask token>

<mask token>
print(b)

a = input()
a = int(a)
s = input()
s = int(s)
b = 0
b = 2 * s - a
print(b)
