import sys input = sys.stdin.readline x,y=map(int,input().split()) print(x^y)