uses crt;
var a:array[1..1000] of byte;
i,n,c,l:integer;
begin
clrscr;
repeat
write('Nhap n:');readln(n);
if (n<1) or (n>1000) then writeln('Nhap lai n');
until (n>=1) and (n<=1000);
for i:=1 to n do
begin
repeat
write('a[',i,']:');readln(A[i]);
if (A[i]<1) or (A[i]>250) then writeln('Nhap lai a[i]');
until (A[i]>=1) and (a[i]<=250);
end;
for i:=1 to n do
if (A[i] mod 2=0) then inc(c) else inc(l);
writeln('Co ' ,c,' so chan');
write('Co ',l,' so le');
readln
end.