a= set([int(i) for i in input().split()]) b={i for i in range(1,11)} c=a&b print(list(c)[0])