a,b,c = map(int,input().split()) if a == b: if a == c: print(a) else: print(c) elif a == c: print(b) elif b == c: print(a) else: print(6 - a - b - c)