a, c = map(int, input().split()) ans = abs(c - a) + (a & c) print(ans)