A = int(input()) B = int(input()) ans = int(str(A^B), 2) print(ans)