# Solution for question1 - second highest number
# py3
def LetMeDoIt(arr):
# processing the input data to find result
arr.remove(max(arr))
return max(arr)
def MainApp():
# taking input as a list of space separated integers
arr = list(map(int, input().split()))
result = LetMeDoIt(arr)
print(result)
if __name__ == '__main__':
MainApp()
# ==================================
# solution for question 2
# py3
def LetMeDoIt(N):
# processing the input data to find result
if N > 1:
if N == 2:
return True
for x in range(2, N):
if N % x == 0:
return False
else:
return True
else:
return False
def MainApp():
# taking input number
N = int(input())
result = LetMeDoIt(N)
print(result)
if __name__ == '__main__':
MainApp()