a, b, c = map(int, input().split()) freq = {} for x in (a, b, c): freq[x] = freq.get(x, 0) + 1 if len(freq) == 1: print(a) else: max_count = max(freq.values()) if max_count == 2: # Find the element with count 1 for key, count in freq.items(): if count == 1: print(key) break else: # All three are different, find missing one for i in range(4): if i not in freq: print(i) break