#include int main(){ using namespace std; unsigned long N; cin >> N; if(N & 1){ if(N == 1){ unsigned long A; cin >> A; cout << A << endl; }else puts("1"); return 0; } vector A(N); copy_n(istream_iterator{cin}, N, begin(A)); nth_element(begin(A), begin(A) + 1, end(A)); cout << A[0] * A[1] << endl; return 0; }