S = [int(i) for i in input().split()] print(S[0] ^ S[1])