n = int(input()) A = [1] + sorted(list(map(int,input().split()))) if n == 1 or n == 2: print(A[-1]*A[-2]) else: if n % 2 == 0: print(A[n//2+1]) else: print(1)