n = int(input()) a = list(map(int, input().split())) a.sort() if n == 1: exit(print(a[0])) elif n == 2: exit(print(a[0] * a[1])) if n % 2: print(1) else: print(a[n // 2])