# input x = input().split() x1 = int(x[0]) x2 = int(x[1]) n = 0 # for if (x1-x2)%2 == 0: n = 2 while n != -1: if n ^ x1 == x2: print(n) break else: n += 2 else: n = 1 while n != -1: if n ^ x1 == x2: print(n) break else: n += 2