a=[int(i) for i in input().split()]
l=[]
for i in range(len(a)-1):
    if(a[i]!=a[i+1]):
        if(a[i] not in l):
            l.append(a[i])
        else:
            print(a[i])
            break
    else:
        print(a[i])
        break
