A, C = map(lambda x: format(int(x), "b"), input().split()) A = A.zfill(max(len(A), len(C))) C = C.zfill(len(A)) b = "" for a, c in zip(A, C): b += str(abs(int(a) - int(c))) print(int(b, 2))