N =int(input()) A = list(map(int,input().split())) A.sort() if N == 1: print(A[0]) else: if N % 2 == 0: print(A[-2]) else: print(1)