var a:array[1..32000] of integer;
i,chan,le,t,s:integer;
begin
write('nhap n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
a, chan:=0;
for i:=1 to n do if a[i] mod 2 = 0 then chan:=chan+1;
writeln('so so chan trong day la:',chan);
b, le:=0;
for i:=1 to n do if a[i] mod 2 = 1 then le:=le+1;
writeln('so so le trong day la:',le);
c, t:=0;
for i:=1 to n do if a[i] mod 2=0 then t:=t+a[i];
write('tong cua ptu chan la:',t);
d, s:=0;
for i:=1 to n do if a[i] mod 2=1 then s:=s+a[i];
write('tong cua ptu le la:',s);