a,b,c = map(int,input().split()) abc = set([a,b,c]) if len(abc) == 1: print(a) elif len(abc) == 3: print(6-sum(abc)) else: print(a^b^c)