l = list(map(int,input().split())) l.sort() s = set(l) import sys if len(s) == 1: print(l[0]) elif len(s) == 3: print(6 - sum(l)) else: if l[0] == l[1]: print(l[2]) else: print(l[0])