var a:array[1..32000] of integer;
i,n,dem,S:integer;
begin
write('nhap n='); readln(n);
for i:=1 to n do
begin
write('a[',i,]='); readln(a[i]);
end;
dem:=0;
for i:=1 to n do if a[i] mod 2=0 then dem:=dem+1;
writeln('so so chan trong day la:',dem);
S:=0;
for i:=1 to n do if a[i] mod 2=0 then S:=S+a[i]*a[i];
write('tong binh phuong cac so chan la:',S);
readln
end.
program vct;
uses crt;
var
i,S,dem,n:integer;
a:array[1..1000] of integer;
begin
writeln('Moi nhap n = '); readln(n);
for i:=1 to n do
begin
writeln('Moi nhap so a thu i = '); readln(a[i]);
end;
S:=0; dem:=0;
for i:=1 to n do
begin
if (a[i] mod 2 = 0) then
begin
inc(dem);
S:=S+a[i]*a[i];
end;
writeln(dem), write(S);
readln;
end;
end.