n = int(eval(input()))

if n & 1:

    print((0))

else:

    ans = 0

    x = 10

    while n >= x:

        ans += n // x

        x *= 5

    print(ans)

n = int(eval(input()))

i = 10

ans = 0



while  i <= n:

    ans += (n // i)

    i *= 5



print((ans if n & 1 == 0 else 0))

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

n = int(eval(input()))
i = 10
ans = 0
while i <= n:
    ans += n // i
    i *= 5
print((ans if n & 1 == 0 else 0))

-if n & 1: -    print((0)) -else: -    ans = 0 -    x = 10 -    while n >= x: -        ans += n // x -        x *= 5 -    print(ans) +i = 10 +ans = 0 +while i <= n: +    ans += n // i +    i *= 5 +print((ans if n & 1 == 0 else 0))