uses crt;
var a:array[1..10000] of longint;
n,i,s,sd,sa:longint;
begin
clrscr;
write('Nhap so luong phan tu: '); readln(n);
for i:=1 to n do
begin
write('Nhap phan tu thu ',i,': '); readln(a[i]);
inc(s,a[i]);
if a[i]>0 then inc(sd,a[i]);
if a[i]<0 then inc(sa,a[i]);
end;
writeln('Tong cac phan tu: ',s);
writeln('Tong cac phan tu duong: ',sd);
write('Tong cac phan tu am: ',sa);
readln;
end.