import sys input=lambda: sys.stdin.readline().rstrip() a,c=map(int,input().split()) print(a^c)