var n,k2,k5,i,a:integer; begin write('n='); read(n); k2:=0; k5:=0; for i:=2 to n do begin a:=i; if a mod 2=0 then while a>=2 do begin a:=a div 2; k2:=k2+1; end; a:=i; if a mod 5=0 then while a>=5 do begin a:=a div 5; k5:=k5+1; end; end; if k2<k5 then write(k2) else write(k5); readln end.