var
n,count,i:integer;
begin
count:=0;
readln(n);
for i:=1 to n do
if (n mod 4 = 0) and (n mod 7 <> 0) then
inc(count);
end;
writeln(count);
end.
var
n,count,i:integer;
begin
count:=0;
readln(n);
for i:=1 to n do
begin
readln(n);
if (n mod 4 = 0) and (n mod 7 <> 0) then
inc(count);
end;
writeln(count);
end.