program zoo;
var
i,n,k,d:integer;
a:array[1..32000] of integer;
function hello(x,y:integer):boolean;
begin
hello:=false;
if x mod y = 0 then hello := true
end;
begin
write(' nhap n: '); readln(n);
for i:= 1 to n do
begin
write(' nhap a[',i,'] = '); readln(a[i]);
end;
write(' nhap k = '); readln(k);
d:=0;
for i:= 1 to n do
if hello(a[i],k) = true then d:=d+1;
write(' so luong so chia het cho k la : ',d);
readln;
end.
const fi='k.inp';
fo='k.out';
var
i,n,k,d:integer;
a:Array[1..32000] of integer;
begin
assign(f,fi);
reset(f);
readln(f,n);
for i:= 1 to n do
read(f,a[i]);
readln(f);
read(f,k);
close(f);
assign(f,fO);
rewrite(f);
d:=0;
for i:= 1 to n do
if a[i] mod k = 0 then inc(d);
write(f,' co ',d,'so chia het cho',k);
close(f);
end.