fruits = list(map(int, input().split())) cnt = {0: 0, 1: 0, 2: 0, 3: 0} for f in fruits: cnt[f] += 1 res = list(map(lambda x: x != 0, cnt.values())) if sum(res) == 1: for k, c in cnt.items(): if c == 3: print(k) elif sum(res) == 2: for k, c in cnt.items(): if c == 1: print(k) else: for k, c in cnt.items(): if c == 0: print(k)