import sys n = int(input()) s=1 for i in range(1,n+1): s = s*i ss = str(s) sss=ss[::-1] for i in sss: if i != '0': print(sss[0:sss.index(i)].count('0')) break
import sys n = int(input()) s=1 for i in range(1,n+1): s = s*i ss = str(s) sss=ss[::-1] for i in sss: if i != '0': print(sss[0:sss.index(i)].count('0')) break