Program HOC24;
var a: array[1..100] of integer;
d,i,n: integer;
begin
write('Nhap so phan tu cua day : '); 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;
writeln('Co ',d,' so chia het cho 3');
write('Cac so chia het cho 3 la : ');
for i:=1 to n do write(a[i],' ');
readln
end.