program chia_het;
uses crt;
var A:array[1..1000] of integer;
n,i,d:integer;
begin
clrscr;
write('Nhap so luong phan tu: '); readln(n);
d:=0;
for i:=1 to n do
begin
write('Nhap so thu ',i,': '); readln(A[i]);
if A[i] mod 3=0 then d:=d+1;
end;
write('Co ',d,' so chia het cho 3');
readln;
end.