n, m = map(int, input().split()) ans = 0 ans = n ^ m print(int(ans))