#include <iostream>
using namespace std;
main()
{
int x[100],n,i,sp=0,pn=1,nn=0;
//sp=suma pozitivelor ; pn= produsul negativelor ; nn= nr.de nr. nule
cout<<"n=";cin>>n;
for(i=1;i<=n;i++)
{cin>>x[i];
if (x[i] > 0) sp=sp+x[i];
else if (x[i] < 0) pn=pn * x[i];
else if (x[i] == 0) nn++;}
cout<<sp<<endl;
cout<<pn<<endl;
cout<<nn<<endl;
}