uses crt;
var a:array[1..100]of integer;
i,n,t,dem:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
t:=0;
for i:=1 to n do
if a[i] mod 2=0 then t:=t+a[i];
dem:=0;
for i:=1 to n do
if a[i] mod 2=1 then inc(dem);
writeln('Tong cac so chan la: ',t);
writeln('So luong so duong le la: ',dem);
readln;
end.