a=int(input())
b=int(input())
for i in range(3):
  c=a^b
  d=a&b
  d=d*2
  a=d
  b=c
print(c)