a,b= map(int,input().split()) a = format(a,'b') b = format(b,'b') ans = int(a) ^ int(b) a = ['0','b',str(ans)] a = ''.join(a) print(int(a,base=2))