a, c = map(int, input().split()) ans = a ^ c print(ans)