n = int(input()) a = list(map(int,input().split())) a.sort() if n == 1: print(a[0]) elif n == 2: print(a[0] * a[1]) elif n % 2 == 1: print(1) else: now = 0 for i in range(n - 1): if i % 2 == 0: now += 1 print(a[now])