A,B=(int(x) for x in input().split()) a=list(bin(A))[2:][::-1] b=list(bin(B))[2:][::-1] for i in range(10): a.append(0) b.append(0) res=[] for i,j in zip(a,b): i = int(i) j = int(j) if i == 1 and j == 0: res.append(1) elif i == 1 and j == 1: res.append(0) elif i == 0 and j == 1: res.append(1) else: res.append(0) ans=0 for i in range(len(res)): if res[i] == 1: ans += 2**(i) print(ans)