a = list(map(int, input().split())) a.sort() if a[0] == a[1] == a[2]: print(a[0]) elif a[0] == a[1]: print(a[2]) elif a[0] == a[2]: print(a[1]) elif a[1] == a[2]: print(a[0]) else: print(print(6 - a[0] - a[1] - a[2]))