a, b = map(int, input().split()) for i in range(max(a, b)): if a ^ i == b: print(i) break