const fi='input.txt';
fo='output.txt';
var f1,f2:text;
n,i,dem:integer;
a:array[1..100]of integer;
{------------------------chuong-trinh-con-1----------------------------}
procedure docfile;
begin
assign(f1,fi); reset(f1);
readln(f1,n);
for i:=1 to n do
read(f1,a[i]);
close(f1);
end;
{------------------------chuong-trinh-con-2----------------------------}
procedure xuatfile;
begin
assign(f2,fo); rewrite(f2);
dem:=0;
for i:=1 to n do
if a[i] mod 5=0 then inc(dem);
writeln(f2,dem);
close(f2);
end;
{-------------------------chuong-trinh-chinh-------------------------}
begin
docfile;
xuatfile;
end.