import math a,b=map(int, input().split()) c = a ^ b print(c)