A,B,C=map(int,input().split()) if A==B and B==C: print(A) elif A==B or B==C or A==C: print(A^B^C) else: print(A^B^C)