#include #include #include using namespace std; int main() { int N; cin >> N; vector A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } if (N % 2 == 1) { cout << (N == 1 ? A[0] : 1) << endl; } else { sort(A.begin(), A.end()); cout << (N == 2 ? 1LL * A[0] * A[1] : 1LL * A[N / 2]) << endl; } return 0; }