import sys



n = int(eval(input()))

if n % 2 == 1:

  print((0))

  sys.exit()

ans = 0

x = 2

while n >= x:

  x *= 5

  ans += n // x

print(ans)
n = int(eval(input()))

if n%2 == 1:

    print((0))

else:

    x = 10

    ans = 0

    while n >= x:

        ans += n // x

        x *= 5

    print(ans)
import sys

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

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

-import sys - -    sys.exit() -ans = 0 -x = 2 -while n >= x: -    x *= 5 -    ans += n // x -print(ans) +else: +    x = 10 +    ans = 0 +    while n >= x: +        ans += n // x +        x *= 5 +    print(ans)