class Problem0581: def solve(this): a, c = map(int, input().split()) print(a ^ c) if __name__ == "__main__": problem = Problem0581() problem.solve()