uses crt;
var a: array[1..100] of longint;
i,n,ta,td,d: longint;
begin
clrscr;
write ('nhap so phan tu cua mang: '); readln (n);
write('NHAP GIA TRI TUNG PHAN TU CUA MANG');
ta:=0; td:=0; d:=0;
for i:=1 to n do
begin
write ('nhap a[',i,']: '); readln (a[i]);
if a[i]<0 then ta:=ta+a[i];
if a[i]>0 then td:=td+a[i];
if a[i]=0 then d:=d+1;
end;
write ('Cac so chan la: ');
for i:=1 to n do if a[i] mod 2=0 then write(i,' ');
write ('Cac so le la: ');
for i:=1 to n do if a[i] mod 2<>0 then write(i,' ');
writeln ('Tong cac so am: ',ta);
writeln ('Tong cac so duong: ',td);
writeln ('Co ',d,' so 0 trong day so');
readln;
end.