#include using namespace std; int main() { int N; cin >> N; vectorA(N); for(int i = 0; i < N; i++) { cin >> A[i]; } sort(A.rbegin(),A.rend()); if(N == 1) { cout << A[0] << endl; } else if(N == 2) { cout << A[0]*A[1] << endl; } else if(N%2 == 1) { cout << 1 << endl; } else { cout << A[N/2-1] << endl; } } /* 1 2 3 4 2 3 4 2 1 */