a,b,c = map(int,input().split()) if a == b and b == c: print(a) elif a != b and a != c and b != c: print(6-a-b-c) else: L = [a,b,c] L.sort() if L[0] == L[1]: print(L[2]) else: print(L[0])