def solve(): n = input().split() a = int(n[0]) c = int(n[1]) print(a ^ c) solve()