import java.io.BufferedInputStream; import java.util.Arrays; import java.util.PriorityQueue; import java.util.Scanner; /* 2 3 4 5 6 7 (4 5 6 6 7) (2 5 6 7 12)(2 3 6 7 20) (2 3 4 5 42) (4 5 6 6 7) 1 2 3 4 5 2 7 5 6 5 4 5 4 5 4 2 3 9 2 1 2 */ public class Main { public static void main(String[] argv){ Scanner sc = new Scanner(new BufferedInputStream(System.in)); int n = sc.nextInt(); long[] a= new long[n]; for(int i = 0 ; i < n ; i++){ a[i] = sc.nextLong(); } if (n % 2 == 1) { System.out.println(1); } else { Arrays.sort(a); if (n == 2 ) System.out.println(a[0] * a[1]); else System.out.println(a[n/2]); } } }