import sys

from fractions import gcd

from itertools import groupby as gb

from itertools import permutations as perm

from itertools import combinations as comb

from collections import Counter as C

from collections import defaultdict as dd

sys.setrecursionlimit(10**5)

def y(f):

    if f:

        print('Yes')

    else:

        print('No')

def Y(f):

    if f:

        print('YES')

    else:

        print('NO')

def Z(f):

    if f:

        print('Yay!')

    else:

        print(':(')

def ispow(n):

    if int(n**.5)**2==n:

        return True

    return False



n = int(eval(input()))



if n % 2 == 1:

    print((0))

    exit()



def f(n):

    if n == 0:

        return 0

    return f(n // 5) + (n % 5)



n //= 2



print(((n - f(n)) // 4))
n = int(eval(input()))



if n <= 4:

    print((0))

    exit()



if n % 2 == 0:

    m = n // 2

    res = 0

    for i in range(1, 100):

        res += m // (5 ** i)

    print(res)

else:

    print((0))

import sys
from fractions import gcd
from itertools import groupby as gb
from itertools import permutations as perm
from itertools import combinations as comb
from collections import Counter as C
from collections import defaultdict as dd

sys.setrecursionlimit(10**5)


def y(f):
    if f:
        print("Yes")
    else:
        print("No")


def Y(f):
    if f:
        print("YES")
    else:
        print("NO")


def Z(f):
    if f:
        print("Yay!")
    else:
        print(":(")


def ispow(n):
    if int(n**0.5) ** 2 == n:
        return True
    return False


n = int(eval(input()))
if n % 2 == 1:
    print((0))
    exit()


def f(n):
    if n == 0:
        return 0
    return f(n // 5) + (n % 5)


n //= 2
print(((n - f(n)) // 4))

n = int(eval(input()))
if n <= 4:
    print((0))
    exit()
if n % 2 == 0:
    m = n // 2
    res = 0
    for i in range(1, 100):
        res += m // (5**i)
    print(res)
else:
    print((0))

-import sys -from fractions import gcd -from itertools import groupby as gb -from itertools import permutations as perm -from itertools import combinations as comb -from collections import Counter as C -from collections import defaultdict as dd - -sys.setrecursionlimit(10**5) - - -def y(f): -    if f: -        print("Yes") -    else: -        print("No") - - -def Y(f): -    if f: -        print("YES") -    else: -        print("NO") - - -def Z(f): -    if f: -        print("Yay!") -    else: -        print(":(") - - -def ispow(n): -    if int(n**0.5) ** 2 == n: -        return True -    return False - - -if n % 2 == 1: +if n <= 4: - - -def f(n): -    if n == 0: -        return 0 -    return f(n // 5) + (n % 5) - - -n //= 2 -print(((n - f(n)) // 4)) +if n % 2 == 0: +    m = n // 2 +    res = 0 +    for i in range(1, 100): +        res += m // (5**i) +    print(res) +else: +    print((0))