def middle(a,b,c):
if a!=min(min(a,b),c) and a!=max(max(a,b),c):
return (a)
elif b!=min(min(a,b),c) and b!=max(max(a,b),c):
return (b)
elif c!=min(min(a,b),c) and c!=max(max(a,b),c):
return (c)
a = int(input())
b = int(input())
c = int(input())
print(middle(a,b,c))