A,B=map(int,input().split()) ans=A^B print(ans)