import sys,collections def Is(): return [int(x) for x in sys.stdin.readline().split()] a,c = Is() print(a ^ c)