uses crt;
var a:array[1..100]of integer;
n,i,dem:integer;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
{-------------------------------xu-ly-----------------------------}
dem:=0;
for i:=1 to n do
if (a[i]>0) and (a[i] mod 3=0) then inc(dem);
writeln('so phan tu chia het cho 3 trong day so la: ',dem);
readln;
end.