#include<iostream>#include<algorithm>#include<vector>using namespace std;int main(){ int n,ind1=0,ind2=0; cin>>n; int a[n],b[n],c[n]; int sum=0,min=-10000000,prz=1; for(int i=0;i<n;i++) { cin>>a[i]; if(a[i]>0) prz*=a[i]; if(a[i]>min) min=a[i]; if(i%2==0) { b[ind1]=a[i]; ind1++; } if(i%2!=0) { c[ind2]=a[i]; ind2++; } } for(int i=0;i<n;i++) { sum+=a[i]; if(a[i]==min) { break; } } sort(b,b+ind1); sort(c,c+ind2); cout<<"1) "<<prz<<endl; cout<<"2) "<<sum<<endl; cout<<"3)"<<endl; int k=0,k1=0; for(int i=0;i<n;i++) { if(i%2==0 && k<ind1) { cout<<b[k]<<" "; k++; } if(i%2!=0 && k1<ind2) { cout<<c[k1]<<" "; k1++; } }}