X, Y = map(int, input().split()) ans = X^Y print(ans)