Program HOC24;
var a: array[1..32000] of integer;
i,n: integer;
t,t1,tl,tc: integer;
begin
write('Nhap N='); readln(n);
t:=0; t1:=0; tc:=0; tl:=0;
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
if a[i] <0 then t:=t+a[i];
if a[i]>0 then t1:=t1+a[i];
if a[i] mod 2=0 then tc:=tc+a[i];
if a[i] mod 2<>0 then tl:=tl+a[i];
end;
writeln('Tong cac so am la : '); readln(t);
writeln('Tong cac so duong la : '); readln(t1);
writeln('Tong cac so chan la : '); readln(tc);
write('Tong cac so le la : '); readln(tl);
readln
end.