Uses crt;
var i,n,k,u,f,y: longint;
a: array[1..100] of longint;
begin clrscr;
readln(n);
for i:=1 to n do read(a[i]); readln;
writeln(a[i]);
for i:=1 to n do if(a[i]<0) then k:=k+a[i];
for i:=1 to n do if(a[i]>0) then u:=u+a[i];
for i:=1 to n do if(a[i] mod 2<>0) then f:=f+a[i];
for i:=1 to n do if(a[i] mod 2=0) then y:=y+a[i];
writeln('Tong cac so am la: ',k);
writeln('Tong cac so khong am: ',u);
writeln('Tong cac so le la: ',f);
writeln('Tong cac so chan la: ',y);
readln;
end.