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