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