import sys readline = sys.stdin.readline abc = list(map(int,readline().split())) abc_set = set(abc) if len(abc_set) == 1: print(abc[0]) elif len(abc_set) == 3: print(6 - sum(abc)) else: print(abc[0] ^ abc[1] ^ abc[2])