# https://yukicoder.me/problems/no/1934 a, b, c = [int(x) for x in input().split()] tester = len({a, b, c}) if tester == 1: print(a) elif tester == 2 or 3: print(a ^ b ^ c)