n=int(eval(input()))

if n%2:

   print((0))

   exit()



n//=2

ans=0

i=1

while n>=(5**i):

   ans+=n//(5**i)

   i+=1

print(ans)

   
n=int(eval(input()))



if n%2:

   print((0))

   exit()

else:

   n//=2

   ans=0

   while n>=5:

      ans+=n//5

      n=n//5

print(ans)

      
n = int(eval(input()))
if n % 2:
    print((0))
    exit()
n //= 2
ans = 0
i = 1
while n >= (5**i):
    ans += n // (5**i)
    i += 1
print(ans)

n = int(eval(input()))
if n % 2:
    print((0))
    exit()
else:
    n //= 2
    ans = 0
    while n >= 5:
        ans += n // 5
        n = n // 5
print(ans)

-n //= 2 -ans = 0 -i = 1 -while n >= (5**i): -    ans += n // (5**i) -    i += 1 +else: +    n //= 2 +    ans = 0 +    while n >= 5: +        ans += n // 5 +        n = n // 5