a, b, c = map(int, input().split()) if a == b == c: print(a) if a != b and b != c and a != c: print(0 ^ 1 ^ 2 ^ 3 ^ a ^ b ^ c) else: print(a ^ b ^ c)