uses crt;
var a:array[1..250]of integer;
n,i,t,dem,dem1:integer;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
t:=0;
for i:=1 to n do
t:=t+a[i];
writeln('Tong=',t);
dem:=0;
dem1:=0;
for i:=1 to n do
begin
if a[i]>0 then dem:=dem+1;
if a[i]<0 then dem1:=dem1+1;
end;
writeln('So luong phan tu duong la: ',dem);
writeln('So luong phan tu am la: ',dem1);
readln;
end.