a,b,c = map(int,input().split()) box = [0,1,2,3] if a==b==c: print(a) elif a != b and b != c and a != c : for s in box: if s not in [a,b,c]: print(s) else: if a==b: print(c) elif b==c: print(a) else: print(b)