#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; } abort(); vector A(N); for(auto&& i : A)cin >> i; sort(begin(A), end(A)); cout << A[0] * A[1] << endl; return 0; }