uses crt;
var a:array[1..100]of integer;
i,n,td,ta,dc,dl:integer;
begin
clrscr;
write('nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
td:=0;
ta:=0;
for i:=1 to n do
begin
if a[i]>0 then td:=td+a[i];
if a[i]<0 then ta:=ta+a[i];
end;
writeln('Tong cac so duong la: ',td);
writeln('Tong cac so am la: ',ta);
dc:=0;
dl:=0;
for i:=1 to n do
begin
if a[i] mod 2=0 then dc:=dc+1
else inc(dl);
end;
writeln('So cac so chan trong day la: ',dc);
writeln('So cac so le trong day la: ',dl);
readln;
end.