For an integer n not less than 0, let us define f(n) as follows:
 - f(n) = 1 (if n < 2)
 - f(n) = n f(n-2) (if n \geq 2)
Given is an integer N. Find the number of trailing zeros in the decimal notation of f(N).

-----Constraints-----
 - 0 \leq N \leq 10^{18}

-----Input-----
Input is given from Standard Input in the following format:
N

-----Output-----
Print the number of trailing zeros in the decimal notation of f(N).

-----Sample Input-----
12

-----Sample Output-----
1

f(12) = 12 × 10 × 8 × 6 × 4 × 2 = 46080, which has one trailing zero.

Difficulty: interview

Starter code:

Solutions:
#!/usr/bin/env python

n = int(input())

def g1(n, p): 
    ''' 
    How many times can n! be divided by p?
    '''
    if n == 0:
        return 0
    return n//p + g1(n//p, p)

def g2(n, p): 
    ''' 
    How many times can n!! be divided by p?
    '''
    if n%2 == 1:
        return g1(n, p) - g2(n-1, p)

    res = g1(n//2, p)
    if p == 2:  
        res += n//2
    return res 

ans = min(g2(n, 5), g2(n, 2)) 
print(ans)


import sys

n = int(input())

# 奇数始まりは必ず0
if n % 2 == 1:
    print(0)
    return

# 5の因子を数える
# 5の倍数は10個ごと、25の倍数は50個ごと、125の倍数は250個ごとに登場する
ans = 0
cnt = 1
while 5**cnt * 2 <= n:
    ans += n // (5**cnt * 2)
    cnt += 1
print(ans)

N = int(input())

def solve_function(N):
    if N % 2 == 1:
        return 0

    n = 10
    ans = 0
    while True:
        if n > N:
            break
        ans += N//n
        n *= 5
    return ans

if solve_function(N):
    print(solve_function(N))
else:
    print(0)

# import itertools
# import math
import sys
# sys.setrecursionlimit(500*500)
# import numpy as np

N = int(input())
# S = input()
# n, *a = map(int, open(0))
# N, M = map(int, input().split())
# A = list(map(int, input().split()))
# B = list(map(int, input().split()))
# tree = [[] for _ in range(N + 1)]
# B_C = [list(map(int,input().split())) for _ in range(M)]
# S = input()

# B_C = sorted(B_C, reverse=True, key=lambda x:x[1])
# all_cases = list(itertools.permutations(P))
# a = list(itertools.combinations_with_replacement(range(1, M + 1), N))
# itertools.product((0,1), repeat=n)

# A = np.array(A)
# cum_A = np.cumsum(A)
# cum_A = np.insert(cum_A, 0, 0)

# def dfs(tree, s):
#     for l in tree[s]:
#         if depth[l[0]] == -1:
#             depth[l[0]] = depth[s] + l[1]
#             dfs(tree, l[0])
# dfs(tree, 1)

# def factorization(n):
#     arr = []
#     temp = n
#     for i in range(2, int(-(-n**0.5//1))+1):
#         if temp%i==0:
#             cnt=0
#             while temp%i==0:
#                 cnt+=1
#                 temp //= i
#             arr.append([i, cnt])
#     if temp!=1:
#         arr.append([temp, 1])
#     if arr==[]:
#         arr.append([n, 1])
#     return arr

if N % 2 == 1:
    print((0))
    return

tot = 0
i = 10
while(N >= i):
    tot += N // i
    i *= 5
print(tot)


n = int(input())
cnt = 0
x = len(str(n))

if n % 2 == 1:
  print((0))
  return
else:
  for i in range(1,26):
    cnt += n//((5**i)* 2)


print(cnt)


N = int(input())

if N%2 == 1:
    print((0))
else:
    ans = 0
    sum = 0
    for i in range(26,0,-1):
        num = N//((5**i)*2)
        ans += i*(num-sum)
        sum = num
    print(ans)


def func(n) :
    if n % 2 == 1:
        return 0
    res = 0
    n //= 2 
    while n :
        res += n //5
        n //= 5
    return res 

n = int(input())
print(func(n))

N = int(input())
if N%2==1:
  print(0)
else:
  ans = 0
  judge = 10
  while True:
    if judge > N:
      break
    else:
      ans += N//judge
      judge *= 5
  print(ans)

N=int(input())

if N % 2 or N < 10:
  print(0)
  return
  
ans = 0
i = 1
while 2*5**i<=N:
  ans += N // (2*5**i)
  i += 1
  
print(ans)

N = int(input())
if N % 2 == 0:
    answer = 0
    N //= 2
    for i in range(100):
        answer += N // 5
        N //= 5
    print(answer)
else:
    print('0')

n = int(input())
if n % 2: print(0); return
n //= 2
ans = 0

while n >= 5:
    n //= 5
    ans += n
print(ans)

# 解説を参考に作成
# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
# from decorator import stop_watch
# 
# 
# @stop_watch
def solve(N):
    if N % 2 == 1:
        print((0))
        return
    n = 10
    ans = 0
    while n <= N:
        ans += N // n
        n *= 5
    print(ans)


def __starting_point():
    N = int(input())
    solve(N)

    # # test
    # from random import randint
    # from func import random_str
    # solve()

__starting_point()

import sys

input = sys.stdin.readline


def main():
    N = int(input())

    if N % 2 == 1:
        print((0))
        return

    count = []
    i = 0
    while True:
        q = N // (10 * 5 ** i)
        if q == 0:
            break
        else:
            count.append((q, i + 1))
            i += 1

    ans = 0
    prev_c = 0
    for c, n_zero in count[::-1]:
        ans += n_zero * (c - prev_c)
        prev_c = c

    print(ans)


def __starting_point():
    main()

__starting_point()

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

else:
    ans = 0
    while n >= 5:
        ans += (n//5)//2
        n //= 5
    print(ans)

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

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


n = int(input())
m = n//10

f = []
while m:
    f.append(m%5)
    m //= 5

print(0 if n%2 else sum(a*(5**(i+1)//4) for i, a in enumerate(f)))


n = int(input())
cnt = 0
i = 1
x = 10
if n % 2 == 1:
  print(0)
else:
  while x <= n:
    
    cnt += n//x
    x *= 5


  print(cnt)

N = int(input())
if N % 2 != 0 or N < 10:
  print(0)
else:
  n = N // 2
  count5 = 0
  while n >= 5:
    n = n // 5
    count5 += n
  print(count5)

n = int(input())
cnt = 0
x = len(str(n))
 
if n % 2 == 1:
  print(0)
else:
  for i in range(1,26):
    cnt += n//((5**i)* 2)
  print(cnt)

N = int(input())
if N%2 == 1:
    print(0)
else:
    cnt = 0
    for i in range(1,N):
        if N >= 2*(5**i):
            cnt += N // (2*(5**i))
        else:
            break
    print(cnt)        

import sys
N = int(input())
if N %2 !=0:
    print(0)
    return
else:
    sum = 0
    num = N
    num_tmp = num //5
    while num_tmp > 0:
        num_tmp = num // 5
        sum += num // 10
        num = num_tmp
print(sum)

N=int(input())

if N%2==0:
    ans=0
    x=10
    while x<=N:
        ans+=N//x
        x*=5
else:
    ans=0

print(ans)

n = int(input())

ans = 0
if n % 2 == 0:
    for i in range(1, 36):
        k = 5**i*2
        ans += n//k
    print(ans)
else:
    print(ans)


def resolve():
    N = int(input())

    if N % 2 == 1:
        return print(0)

    ans = 0
    tmp = N // 2
    while tmp:
        tmp //= 5
        ans += tmp
    print(ans)


def __starting_point():
    resolve()
__starting_point()

n=int(input())
if n%2==1:
    ans=0
else:
    fs=[2*5**i for i in range(1,41)]
    ans=0
    for i in range(40):
        ans+=n//fs[i]
print(ans)

n=int(input())
if n<=4:
  print((0))
  return
  
if n%2==1:
  print((0))
  return
  
cnt=10
ans=0

for i in range(100):
  ans+=n//cnt
  cnt*=5
  
  
print(ans)


n=int(input());ans,m=0,10
if n%2!=0: print(0);return;
while m<=n:
  ans+=n//m
  m*=5
print(ans)

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


n = input()
m = len(n)
n = int(n)
if n%2==1:
    print(0)
else:
    if m==1:
        print(0)
    else:
        ans = 0
        i = 1
        while  True:
            ans_plus=n//(2*5**i)
            if ans_plus==0:
                break
            ans += ans_plus
            
            i += 1
        print(ans)

n = int(input())
if n%2 == 1:
    print(0)
    return
num = 5
i = 1
ans = 0
while num**i < n:
    ans += n//num**i//2
    i += 1
print(ans)

N=int(input())
if N%2:
    print(0)
else:
    ans=0
    tmp=10
    while tmp<=N:
        ans+=N//tmp
        tmp*=5
    print(ans)

n=int(input())
if n%2!=0:
  print(0)
  return
n//=10

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = X_dumy//n
    return out

n=Base_10_to_n(n,5)
n=reversed(list(n))
tmp=1
ans=0

for i in n:
  ans+=int(i)*tmp
  tmp=tmp*5+1
print(ans)

n=int(input())


ans=0
tmp=0
p=1
if n%2==0:
    k=n//2
    while True:
        tmp =k//pow(5,p)

        ans+=tmp
        p+=1

        if tmp==0:
            break

print(ans)





n = int(input())

if n % 2 == 1:
	print('0')
		
else:
	five = 0
	two = 0
	for i in range(1, n):
		f = n // (2*(5**i))
		t = n // (2**i)
		if f == t == 0:
			break
		five += f
		two += t
	print(min(five, two))

N = int(input())
if N%2==1:
  print(0)
else:
  ans = 0
  tmp = N//(5*2)
  i = 1
  while tmp>0:
    ans += tmp
    i += 1
    tmp = N//(2*5**i)
  print(ans)

N=int(input());a=10;b=0
if N&1==0:
    while a<=N:b+=N//a;a*=5
print(b)

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


n = int(input())
cnt = 0
x = len(str(n))

if n % 2 == 1:
  print(0)
  return
for i in range(1,26):
  cnt += n//((5**i)* 2)


print(cnt)

N = int(input())
ans = 0
if N%2 == 0:
  five = 10
  while N//five > 0:
    ans += N//five
    five *= 5
print(ans)

n=input()
m=len(n)
n=int(n)

if n%2==1:
    print(0)
else:
    if m==1:
        print(0)
    else:
        ans=0
        i=1
        while True:
            ans_plus=n//(2*5**i)
            if ans_plus==0:
                break
            ans+=ans_plus

            i+=1
        print(ans)

n = int(input())
if n%2 != 0:
    print(0)
else:
    ans = 0
    dum = 5
    while n > dum:
        ans += (n//dum)//2
        dum = dum*5
    print(ans)

n = int(input())
if n % 2 == 1:
    print(0)
    return
#### n is even ####
ans = 0
cnt = 0
ones = 0
keta = []
cnt = 5 * 2
while n >= cnt:
    ans += n // cnt
    cnt *= 5

print(ans)

import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    
    n = I()
    if n%2 == 0:
        ans = 0
        for i in range(1,27):
            ans += n//(2*pow(5,i))
        print(ans)
    else:
        print((0))

main()


n = int(input())

if n % 2 == 0:
    n5 = 1
    y = 10
    c = []

    while y <= n:
        c.append(n//y)
        if len(c) > 1:
            c[-2] -= c[-1]
        y *= 5

    cnt = 0
    for i in range(len(c)):
        cnt += c[i]*(i+1)

    print(cnt)
else:
    print(0)

N = int(input())
if N%2 == 1:
    Answer = 0
else:
    Answer = 0
    for i in range(1,100):
        Answer += N//(2*5**i)
print(Answer)

import math
N = int(input())
ans = 0
if N == 0 or N % 2 == 1:
    ans = 0
else:
    # means N >= 2 and even
    digN = round( math.log(N , 5) )

    i = 1
    while i <= digN:
        ans +=  ( N //( 5 ** i * 2 ) )
        i += 1

print(ans)

N = int(input())
cnt = 0
if N % 2 == 1:
    print (0)
else:
    for i in range(1,N):
        if N >= (2*(5**i)):
            cnt += N//(2*(5**i))
        else:
            break
    print (cnt)

n = int(input())

if n%2==1:
    print((0))
    return

fcnt = 0
tmp = 5
while n>=tmp:
    fcnt+=(n//2)//tmp
    tmp*=5

print(fcnt)


n = int(input())

if n % 2 != 0:
    print(0)
else:
    ans = 0
    n //= 2
    while n:
        ans += n//5
        n //= 5
    
    
    print(int(ans))

import sys
pin=sys.stdin.readline

def main():
  N=int(pin())
  if N%2==1:
    print((0))
  else:
    ans=0
    i=10
    while True:
      if N<i:
        break
      ans+=N//i
      i*=5
    print(ans)
  return
main()


N = int(input())

if N % 2 == 0:
    tmp = 10
    ans = 0
    while tmp <= N:
        ans += N // tmp
        tmp = 5 * tmp

    print(ans)
 
else:
    print((0))


import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

n = inp()

ans = 0
if n % 2 == 1:
    ans = 0
else:
    div = 10
    while div <= n:
        ans += n // div
        div *= 5

print(ans)

N = int(input())
i = 2
a = 0
while i <= N:
    a += N // i
    i *= 2
i = 2*5
b = 0
while i <= N:
    b += N // i
    i *= 5
print(min(a,b) if N % 2 == 0 else 0)

n = int( input() )
 
if n % 2 == 1:
    print( 0 )
    return
 
ans = 0
n = n // 2
while n > 0:
    n = n // 5
    ans += n
 
print( ans )

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

n=int(input())

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


N = int(input())
if N % 2 == 1:
    ans = 0
else:
    ans = 0
    for i in range(1,50):
        ans += (N//2) // 5**i
print(ans)

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

import sys

N = int(input())

if N % 2 == 0:
    k = N // 2
    tmp = 5
    ans = 0
    while k >= tmp:
        ans += k // tmp
        tmp *= 5
else:
    ans = 0
print(ans)

N=int(input())

if N%2 or N<10:
  print(0)
else:
  cnt,n=0,1
  while n<=N:
    cnt+=N//(10*(n))
    n*=5
  print(cnt)

n = int(input())

twoes = [0]
fives = [0]

if n % 2 == 1:
    print(0)
else:
    i = 0
    while 1:
        if n // (2 ** (i +1)) != 0:
            twoes.append(n // (2 ** (i + 1)))
            i += 1
        else:
            break
    i = 0
    while 1:
        temp5 = (n // (5** (i +1))) //2
        if temp5 != 0:
            fives.append(temp5)
            i += 1
        else:
            break
    print(min(sum(twoes), sum(fives)))    

#!/usr/bin/env python

n = int(input())

if n%2 == 1:
    print((0))
    return

mp = tmp = 0 
while True:
    if 5**tmp > n:
        break
    mp = tmp 
    tmp += 1

ans = 0 
for i in range(1, mp+1):
    ans += n//(2*(5**i))

print(ans)


n=int(input())
if n%2==1:
    print(0)
    return
n//=2
t=1
count=-1
while n>=t:
    t*=5
    count+=1
ans=0
for i in range(1,count+1):
    ans+=n//(5**i)
print(ans)

import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
# def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()
  if n%2==1 or n<10:
    return 0

  st=10
  ans=[]
  while st<=n:
    ans.append(n//st)
    st*=5

  return sum(ans)

# main()
print((main()))


#!/usr/bin/env python3


def solve(N: int):
    if N % 2 == 0:
        N = N // 2
        answer = 0
        div = 5
        while N >= div:
            answer += N // div
            div *= 5
        return answer

    else:
        return 0

    return answer


def main():
    N = int(input())
    answer = solve(N)
    print(answer)


def __starting_point():
    main()

__starting_point()

n=int(input())

if n%2==1:
    print(0)
else:
    m=n//2
    ans=0
    while m>0:
        ans+=m//5
        m=m//5
    print(ans)

n = int(input())
cnt = 0
x = len(str(n))

if n % 2 == 1:
  print((0))
else:
  for i in range(1,26):
    cnt += n//((5**i)* 2)
  print(cnt)


n=int(input())
if n%2!=0:
  print((0))
  return
n//=10

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = X_dumy//n
    return out

n=Base_10_to_n(n,5)
n=reversed(list(n))
tmp=1
ans=0

for i in n:
  ans+=int(i)*tmp
  tmp=tmp*5+1
print(ans)


import sys


N = int(input())


if N % 2 != 0:
    print((0))
    return

N //= 10
cnt = 0
while N > 0:
    cnt += N
    N //= 5

print(cnt)


N = int(input())

def solve_function(N):
    if N % 2 == 1:
        return 0

    it_can_be_divisible = 10
    ans = 0
    while True:
        if it_can_be_divisible > N:
            break
        ans += N//it_can_be_divisible
        it_can_be_divisible *= 5

    return ans

if solve_function(N):
    print(solve_function(N))
else:
    print(0)

n = int(input())

if n % 2 != 0:
    print(0)
else:
    ans = 0
    tmp = 10
    while tmp <= n:
        ans += n//tmp
        tmp *= 5
    
    print(int(ans))

def main():
  N = int(input())
  if N % 2 != 0:
    print(0)
    return
  ans = 0
  i = 1
  while 2*5**i<=N:
    ans += N//(2*5**i)
    i += 1
      
  print(ans)
main()

N = int(input())

if N % 2 == 1:
    print(0)
    return

n = 10
ans = 0
while True:
    if n > N:
        break
    ans += N//n
    n *= 5

print(ans)

n = int(input())
res = 0
if n % 2 == 0:
  for i in range(1,30):
    p = n // (5 ** i)
    #print(i,p)
    if p % 2 == 1:
      res += (p-1) // 2
    else:
      res += p // 2
print(res)

n = int(input())
if n%2!=0:
    print(0)
else:
    k=10
    q = 0
    while k<=n:
        q += n//k
        k *= 5
    print(q)

n = int( input() )

if n % 2 == 1:
    print( 0 )
    return

ans = 0
n = n // 2
while n > 0:
    n = n // 5
    ans += n

print( ans )

n=int(input())
if n<2:
    print(0)
else:
    ans=0
    if n%2==1:
        print(0)
    else:
        ans+=n//10
        for i in range(100):
            ans+=n//(10*(5**(i+1)))
        print(ans)

n = int(input())
i = 10
ans = 0

while  i <= n:
    ans += (n // i)
    i *= 5

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


n = int(input())
if n%2 ==1:
    print(0)
    return
cnt = 0
i = 1

if n%2 == 0:
    while n//(2*(5**i)) > 0:
        cnt += n//(2*(5**i))
        i +=1
print(cnt)

N = int(input())

if N % 2 == 1:
    ans = 0
else:
    div2 = N // 2
    n = N // 2
    k = 1
    while n // 2**k > 0:
        div2 += n // 2**k
        k += 1

    div5 = 0
    n = N // 2
    k = 1
    while n // 5**k > 0:
        div5 += n // 5**k
        k += 1
    
    ans = min(div2, div5)

print(ans)

import math

N = int(input())

if N%2 == 1:
    print(0)
    return

ans = 0
i = 1
while 1:
    a = 2*5**i
    if N//a == 0:
        break
    ans += (N//a)
    i += 1
print(ans)

#!/usr/bin/env python3

#import
#import math
#import numpy as np
N = int(input())

if N % 2 == 1:
    print((0))
else:
    ans = 0
    for i in range(50):
        ans += N // (10 * 5 ** i)
    
    print(ans)


n=int(input())
if n%2==1:
    print("0")
    return
count=0
for i in range(1,30):
    count+=n//(2*5**i)
print(count)

n = int(input())

fives = [0]

if n % 2 == 1:
    print(0)
else:
    i = 0
    while 1:
        temp5 = (n // (5** (i +1))) //2
        if temp5 != 0:
            fives.append(temp5)
            i += 1
        else:
            break
    print(sum(fives))    

#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def solve(n):
    if n % 2 != 0:
        return 0

    total = 0
    now = 5
    while now <= n:
        total += n // (now * 2)
        now *= 5

    return total


def main():
    N = int(input())
    print((solve(N)))


def __starting_point():
    main()

__starting_point()

N = int(input())

if N % 2 == 0:
    Ans = 0
    p = 1
    check = 0
    while check != 0 or p == 1:
        check = N // (2 * 5**p)
        Ans += check
        p += 1
    print(Ans)

else:
    print(0)

import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 6)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")
al = "abcdefghijklmnopqrstuvwxyz"
AL = al.upper()

n = k()
if n%2==1:
    print(0)
else:
    for i in range(1,n):
        if n>=2*(5**i):
            cnt += n//(2*(5**i))
        else:
            break
    print(cnt)

import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())

    if N % 2:
        print((0))
        return

    ans = 0
    N //= 2
    while N:
        N //= 5
        ans += N

    print(ans)
    return


def __starting_point():
    main()

__starting_point()

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

N = int(input())
if N%2 == 1 :
    print(0)
    return
n = 0
i = 0
for i in range(1,26) :
    n += N//((5**i)*2)

print(n)

import math
from decimal import *

def cnt_prime(p, n):
    div = Decimal(str(n))
    s = 0

    while True:
        div /= p
        if div < 1:
            break
        if p == 2:
            s += int(div.quantize(Decimal('0.0'), rounding=ROUND_FLOOR))
        else:
            s += int(div.quantize(Decimal('0.0'), rounding=ROUND_FLOOR)) // 2
    return s

N = int(input())


if N % 2 == 1:
    print(0)
else:
    print(min(cnt_prime(2, N), cnt_prime(5, N)))

n = int(input())
if n%2!=0:
    print(0)
else:
    cnt = 0
    n = n//2
    while n>0:
        cnt = cnt + (n//5)
        n = n//5
    print(cnt)

import sys
# import math
# import bisect
# import numpy as np
# from decimal import Decimal
# from numba import njit, i8, u1, b1 #JIT compiler
# from itertools import combinations, product
# from collections import Counter, deque, defaultdict

# sys.setrecursionlimit(10 ** 6)
MOD = 10 ** 9 + 7
INF = 10 ** 9
PI = 3.14159265358979323846

def read_str():      return sys.stdin.readline().strip()
def read_int():      return int(sys.stdin.readline().strip())
def read_ints():     return map(int, sys.stdin.readline().strip().split())
def read_ints2(x):   return map(lambda num: int(num) - x, sys.stdin.readline().strip().split())
def read_str_list(): return list(sys.stdin.readline().strip().split())
def read_int_list(): return list(map(int, sys.stdin.readline().strip().split()))
def GCD(a: int, b: int) -> int: return b if a%b==0 else GCD(b, a%b)
def LCM(a: int, b: int) -> int: return (a * b) // GCD(a, b)

def f(n):
    if n <= 2:
        return n
    return f(n - 2) * n

def Main():
    n = read_int()
    if n % 2:
        print(0)
        return

    ans = 0
    n //= 2
    while n >= 5:
        n //= 5
        ans += n
    print(ans)

def __starting_point():
    Main()
__starting_point()

n = int(input())

if(n % 2 !=0):
    print(0)
    return

ketasu = len(str(n))

ans = 0
for i in range(1, 100):
    ans += n // (2 * 5 **i)

print(ans)

#まずnが奇数なら値は0
#nが偶数なら素因数5の個数
#素因数10の個数を求めたい
n=int(input())
if n%2==1:
  print((0))
else:
  ans=0
  num=5
  n=n//2
  while num<=n:
    ans+=n//num
    num=num*5
  print(ans)


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

n = int(input())
if n % 2 == 1:
  print(0)
  return
ans = 0
ex = 1
while True:
  expo = 2 * 5**ex
  if n // expo == 0:
    break
  ans += n // expo
  ex += 1
print(ans)

n = int(input())

ans = 0
if n % 2 == 1:
    ans = 0
else:
    ans += n//10
    n = n//10
    while n > 1:
        ans += n//5
        n = n//5
        # print(n)
print(ans)