#include <iostream>
using namespace std;
main()
{
int count1=0,count2=0,sum1=0,sum2=0;
float a;
while(cin>>a&&a==(int)a)
{
if(a>0)
{
count1++;
sum1+=a;
}
else if(a<0)
{
count2++;
sum2+=a;
}
else
break;
}
cout<<"正整数有"<<count1<<"个"<<'\n'<<"负整数有"<<count2<<"个"<<endl;
cout<<"正整数和为:"<<sum1<<'\n'<<"负整数和为:"<<sum2<<endl;
}