# No.581 XOR a, c = [int(i) for i in input().split()] print(a ^ c)