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