x,y=map(int,input().split()) c=x^y print(c)