var
k, i, n, x: integer;
begin
readln (n);
k := 0;
for i := 1 to n do
readln (x);
if (x mod 10 = 4) and (x mod 6 = 0) then
k := k+1;
end;
writeln (k);
end.
var
k, i, n, x: integer;
begin
readln (n);
k := 0;
for i := 1 to n do
begin
readln (x);
if (x mod 10 = 4) and (x mod 6 = 0) then
k := k+1;
end;
writeln (k);
end.