Problem:
 Score : 500 points    Problem Statement 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 1 12      Sample Output 1 1  f(12) = 12 × 10 × 8 × 6 × 4 × 2 = 46080 , which has one trailing zero.       Sample Input 2 5      Sample Output 2 0  f(5) = 5 × 3 × 1 = 15 , which has no trailing zeros.       Sample Input 3 1000000000000000000      Sample Output 3 124999999999999995

Solution (Python):


n=int(input())
if n%2:print(0);exit()
num=10
ans=0
while n>=num:
    ans+=n//num
    num*=5
print(ans)

Solution (Python):
n = int(input())

def g(n, x):
    f = 1 if x == 2 else 2
    if n == 0:
        return 0
    else:
        return g(n // x, x) + n // x // f

if n % 2 != 0:
    print(0)
else:
    print(min(g(n, 2), g(n, 5)))

Solution (Python):

n = int(input())

def g(n, x):
    cnt = 0
    while True:
        n = n // x
        if x == 2:
            cnt += n
        else:
            cnt += n // 2
        if n == 0:
            break
    return cnt

if n % 2 != 0:
    print(0)
else:
    print(min(g(n, 2), g(n, 5)))

Solution (Python):
n = int(input())

def g(n, x):
    cnt = 0
    while True:
        n = n // x
        cnt += n // 2
        if n == 0:
            break
    return cnt

if n % 2 != 0:
    print(0)
else:
    print(min(g(n, 2), g(n, 5)))

Solution (Python):
n = int(input())

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

    n_half = n//2
    count = 0

    i = 1
    while 5**i <= n_half:
        count += n_half // 5**i
        i += 1

    return count


print(func(n))

Solution (Python):



import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 

from fractions import gcd

n = int(input())


if n%2: print(0)
else:
    n//= 2

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

Solution (Python):
N = int(input())
count = 0

if N % 2 != 0:
    print(0)
    exit()
P = 1
k = 2 * 5

while k <= N:  
    count += N//k
    k *= 5
    
print(count)

Solution (Python):



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

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

    def count_tail_zero(s):
        cnt = 0
        for i in range(len(s) - 1, 0, -1):
            if s[i] == '0':
                cnt += 1
            else:
                break
        return cnt

    print(count_tail_zero(str(f(N))))


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

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

    denominator = 10
    ans = 0
    while denominator <= N:
        ans += N // denominator
        denominator *= 5

    print(ans)


if __name__ == "__main__":
    correct()

Solution (Python):



n = int(input())

if n % 2 == 1:
    print(0)
else:
    c = 1
    s = 0
    while 2 * 5**c <= n:
        s += n // (2 * 5**c)
        c += 1
    print(s)

Solution (Python):
import numpy as np
N = int(input())
n2 = N % 2
if n2 != 0:
  ans = 0
elif N <= 2:
  ans =0
else:
  a = int(np.log(N) // np.log(5))
  A = [N // (2 * (5 ** (i + 1))) for i in range(a)]
  ans = np.sum(A)
print(ans)

Solution (Python):
import sys

stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
na = lambda: list(map(int, stdin.readline().split()))
ni = lambda: int(ns())

n = ni()

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

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

Solution (Python):
n = int(input())
p = 1
count = 0
while (2*5**p <= n):
    count += n//(2*5**p)
    p+=1

if (n%2==0):
    print(count)
else:
    print(0)

Solution (Python):
n=int(input())
ori=n
if n%2:
	print(0)
else:
	ans=0
	n//=2
	while(n):
		ans+=n//5
		n//=5
	print(ans)

Solution (Python):

N = int(input())

def factorial(n, p):
    if n == 0: return 0
    return n//p + factorial(n//p, p)

def duble_factorial(n, p):
    if n%2 == 1:
        return factorial(n,p) - duble_factorial(n-1, p) 
    else:
        res = factorial(n//2, p)
        if p == 2: 
            res += n//2
        return res

ans = min(duble_factorial(N,2), duble_factorial(N,5))
print(ans)

Solution (Python):
N = int(input())

def factorial(n, p):
    if n == 0: return 0
    return n//p + factorial(n//p, p)

def duble_factorial(n, p):
    if n%2 == 1:
        return factorial(n,p) - duble_factorial(n-1, p) 
    else:
        res = factorial(n//2, p)
        if p == 2: 
            res += n//2
        return res

ans = min(duble_factorial(N,2), duble_factorial(N,5))
print(ans)

Solution (Python):
n = int(input())
ans = 0

if (n //2) *2 != n:
    print(ans)
else:
    n = n // 2
    while n >= 5:
        n = n // 5
        ans += n

    print(ans)

Solution (Python):

import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(N: int):

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

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

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
def calc(n):
    ans = 0
    while n > 0:
        ans += (n//5)
        n //= 5
    return ans

if (n & 1): print(0)    
else: print(n//10 + calc(n//10))

Solution (Python):
N = int(input())

def p_adic_valuation_factorial(n, p):
    result = 0
    pow_p = p
    while n >= pow_p:
        result += n // pow_p
        pow_p *= p
    return result

if N % 2 == 0:
    e2 = N // 2 + p_adic_valuation_factorial(N // 2, 2)
    e5 = p_adic_valuation_factorial(N // 2, 5)
    result = min(e2, e5)
else:
    result = 0
print(result)

Solution (Python):
n=int(input())
if n%2:print(0)
else:
    a=0
    i=10
    while i<=n:
        a+=n//i
        i*=5
    print(a)

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

Solution (Python):
N = int(input())

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

ans = 0

N = N // 2

while True:
    if N == 0:
        break
    ans += N // 5
    N = N // 5

print(ans)

Solution (Python):
n = int(input())
r = 0
if n % 2 == 0:
  n //= 2
  while n:
    n //= 5
    r += n
print(r)

Solution (Python):
n = int(input())
r = 0
if n % 2 == 0:
  n //= 2
  while n:
    n //= 5
    r += n
print(r)

Solution (Python):
N = int(input())
if N%2:
    print(0)
    exit()

k = 10
ans = 0
while k <= N:
    ans += N//k
    k *= 5
print(ans)

Solution (Python):
import math
n = int(input())

def fact(n, x, ans):
    if x > n:
        return ans
    else:
        ans +=  math.floor(n//(2*x))
        return fact(n, x*5, ans)

if n%2:
    print(0)
else:
    print(fact(n, 5, 0))

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,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 LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()

  if n%2!=0:
    return 0

  a=5
  ans=0
  while True:
    if a*2>n:
      return ans
    ans+=n//(a*2)
    a*=5


print(main())

Solution (Python):
n=int(input())
if n%2:print(0);exit()
n//=2
a,m=1,-1
while a<=n:
  a*=5;m+=1
ans=0
for i in range(m):
  ans+=n//5
  n//=5
print(ans)

Solution (Python):
N = int( input() )

ans = 0

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

Solution (Python):
n = int(input())
if n % 2 == 1:
    print(0)
    exit()
n //= 2
res = 0
while n > 0:
    n //= 5
    res += n
print(res)

Solution (Python):
n = int(input())
if n % 2 == 1:
    print(0)
else:
    n //= 2
    res = 0
    while n > 0:
        n //= 5
        res += n
    print(res)

Solution (Python):
N = int(input().strip())
if N % 2 == 0:
    ans = 0
    tmp = 10
    while N // tmp > 0: 
        ans += (N // tmp)
        tmp *= 5
    print(ans)
else:
    print(0)

Solution (Python):
import math
n = int(input())
if n % 2 == 1:
    print(0)
else:
    divide = 5
    ans = 0
    n = n//2
    while divide <= n:
        ans += n // divide
        divide *= 5
        
        
    print(ans)

Solution (Python):
import math
N = int(input().strip())

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

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

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

Solution (Python):
n=int(input())
if n%2:print(0)
else:
    a=0
    i=10
    while i<=n:
        a+=n//i
        i*=5
    print(a)

Solution (Python):
n = int(input())

if n % 2 == 1:
    print(0)
    exit(0)
n //= 2

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

Solution (Python):
N = int(input())

ans = 0
num = 10

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

print(int(ans))

Solution (Python):
N = int(input())

if N%2 == 1:
  print(0)
else:
  denomi = 10
  ans = 0
  while denomi <= N:
    ans += N//denomi
    denomi *= 5
  print(ans)

Solution (Python):
n=int(input())
if n%2==1:
  print(0)
else:
  now=1
  ans=0
  while 1:
    if (n//(5**now))//2==0:
      break
    else:
      ans+=(n//(5**now))//2
      now+=1
  
  print(ans)

Solution (Python):

import math
import datetime
import itertools
import sys
import copy





N = int(input())

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

Solution (Python):
n=int(input())
if n%2==0:
    i=1
    c_of_5=0 
    while 5**i <= n:
        c_of_5+=n//((5**i)*2)
        i+=1
    print(c_of_5)
else:
    print(0)

Solution (Python):
n=int(input())
if n<=6:
    print(0)
else:
    if n%2==0:
        i=1
        c_of_5=0 
        while 5**i <= n:
            c_of_5+=n//((5**i)*2)
            i+=1
        print(c_of_5)
    else:
        print(0)

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

Solution (Python):
N = int(input())

ans = 0
if N % 2 == 0:
    i = 0
    while True:
        x = (2 * 5 * (5 ** i))
        if x > N:
            break
        ans += N // x
        i += 1

print(ans)

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

Solution (Python):
N = int(input())
if N % 2 == 1:
	print(0)
else:
	ans = 0
	k = 1
	while (5**k)*2 <= N:
		ans += N // ((5**k)*2)
		k += 1
	print(ans)

Solution (Python):
N = int( input() )

if N % 2 == 1 or N == 0:
   print(0) 
   exit() 

import math    
ct = 0

M = N // 2
for i in range( math.ceil( math.log(M, 5) ) ) :
   if M >= 5**(i+1) :
      ct += M // ( 5**(i+1) )

print(ct)

Solution (Python):
n=int(input())

if n<=6:
    print(0)
else:
    if n%2==0:
        n2=(n//10)*10
        i=1
        c_of_5=0 
        while 5**i <= n2:
            c_of_5+=n2//((5**i)*2)
            i+=1
        print(c_of_5)
    else:
        print(0)

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

Solution (Python):
N = int(input())

if N & 1:
    print(0)
else:
    k = 10
    ans = 0
    while k <= N:
        ans += N // k
        k *= 5
    print(ans)

Solution (Python):
N = int(input())
if N % 2 == 1:
    print(0)
    exit()
ans = 0
"""tmp = 10
while tmp <= N:
    ans += N // tmp
    tmp *= 10"""
tmp = 50
while tmp <= N:
    ans += N // tmp
    tmp *= 5
ans += N // 10
print(ans)

Solution (Python):
n = int(input())
k = 10
ans = 0
if n % 2 == 0:
    while k <= n:
        ans += n // k
        k *= 5

print(ans)

Solution (Python):
n = int(input())

if n%2!=0:
    print(0)
    exit()
else:
    m = n//2
    count = 0
    for i in range(1,30):
        p = 5**i
        count += m//p
    print(count)
    exit()

Solution (Python):
N = int(input())
if N % 2 == 1:
  print(0)
else:
  a = N // 2
  S = 0
  while a != 0:
    a //= 5
    S += a
  print(S)

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

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())
def counter(n):
    point = 0
    s = str(n)
    keta = len(s)
    if keta == 1:
        return 0
    if n%2 == 1:
        return 0
    else:
        i = 1
        while True:
            point += n//(2*5**i)
            i += 1
            if n//(2*5**i) == 0:
                break
        return point
print(counter(n))

Solution (Python):
def resolve():
    N=int(input())
    c=0
    if N %2 ==1:
        print(0)
        return
    N//=10
    c=N
    while N!=0:
        N//=5
        c+=N
    print(c)
 
 
 
 
 
if __name__ == "__main__":
    resolve()

Solution (Python):
n = int(input())

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

    ans = x
    print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

n = int(input())

if n % 2 != 0:
    print(0)
    sys.exit(0)

ans = 0
base = 1
while True:
    base *= 5
    even = base * 2
    if n < even:
        break
    ans += n // even

print(ans)

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

N = INT()

A = []
i = 1
while 5 ** i * 2 <= INF:
    A.append(5**i * 2)
    i += 1

if N % 2 == 0:
    ans = 0
    for a in A:
        ans += N // a
    print(ans)
else:
    print(0)

Solution (Python):
N = int(input())
if N % 2 == 1:
    print(0)
else:
    N //= 2
    print(sum(N // pow(5, j) for j in range(1, 30)))

Solution (Python):
N = int(input())
"""
f = [0]*(N + 1)
f[0] = 1
f[1] = 1
for i in range(2, N + 1):
    f[i] = i * f[i - 2]

count = 0
while f[N] % 10 == 0:
    count += 1
    f[N] = f[N] // 10
    

print(count)
"""
if N % 2 == 1:
    print(0)
if N % 2 == 0:
    five_count = 0
    while N >= 5**five_count:
        five_count += 1
    
    num_5 = list()
    for i in range(1, five_count + 1):
        num = N // (5**i)

        num_5.append(num//2)
        
    sum_5 = sum(num_5)
    print(sum_5)

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


n //= 2
ans=n

def kosu(n,p):
    if n == 0:
        return 0
    return n //p + kosu(n//p,p)

print(kosu(n,5))

Solution (Python):
inp=int(input())

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

    print(ans)

Solution (Python):


def resolve():
    N=int(input())
    c=0
    if N %2 ==1:
        print(0)
        return
    N//=10
    c=N
    while N!=0:
        N//=5
        c+=N
    print(c)





if __name__ == "__main__":
    resolve()

Solution (Python):
N = int(input())
count = 0
if N % 2 == 0:
	for i in range(0,100):
		if N >= (10*(5**i)):
			
			count += ((N//10)//(5**i))
		else:
			break;
	print(count)
else:
	print(0)

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

Solution (Python):

from sys import stdin

n = int(stdin.readline().rstrip())

j = 1
k = 0
while n // (10 * j) > 0:
 k = k + n // (10 * j)
 j = j * 5

if(n % 2 == 1):
  print(0)
else:
  print(k)

Solution (Python):
import sys
n=int(input())
if n%2==1:
    print(0)
    sys.exit()
n//=2
res=0
while n/5!=0:
    res+=n//5
    n//=5
print(res)

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

Solution (Python):
N = int(input())

ans = 0
div = 5

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

    print(int(ans))

Solution (Python):
n=int(input())
 
c=0
i=1
tmp=n//2
while tmp!=0:
  tmp=tmp//5
  c=c+tmp
if n%2==0:
  print(int(c))
else:
  print(int(0))

Solution (Python):
def e_double_factorial():
    N = int(input())

    if N % 2 == 1:
        return 0

    tmp = 10
    ans = 0
    while tmp <= N:
        ans += N // tmp
        tmp *= 5
    return ans

print(e_double_factorial())

Solution (Python):
n = int(input())

tot = 0
cur = 5
if n%2 == 1:
  print(0)
else:
  while n//(cur*2) >= 1:
    tot = tot + n//(cur*2)
    cur = cur*5
  print(tot)

Solution (Python):
import sys
MAX_INT = int(10e12)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
ans = 0

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

Solution (Python):
n=int(input())
res=0
if (n%2)==0:
    x=5
    while True:
        if (n//x)==0:
            break
        d=n//x
        if (d%2)==1:
            d=(d-1)//2
        else:
            d//=2
        res+=d
        x*=5
print(res)

Solution (Python):
n=int(input())
a=n
count=0
if n%2 == 0:
  for i in range(1,27):
    count+=(n//((5**i)*2))
  print(count)
else:
  print(0)

Solution (Python):


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


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

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

Solution (Python):
N = int(input())
l = len(str(N))

ans = 0
digit = 10

if N < 2:
  print(0)


elif N % 2 == 1:
  print(0)



else:
  while N >= digit:
    ans += N // digit
    digit = digit * 5
  
  print(ans)

Solution (Python):

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

Solution (Python):
N = int(input())
num = 10
cnt = 0
if N%2!=0:
  print(0)
  exit()
for i in range(1, N+1):
  cnt += N//num
  num = num*5
  if num > N:
    break
print(cnt)

Solution (Python):
N = int(input())

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

    print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())

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

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

print(ans)

Solution (Python):
def f2(n):
  if n % 2 != 0: return 0
  ans = 0
  d = 10
  while n >= d:
    ans += n // d
    d *= 5
  
  return ans

n = int(input())
print (f2(n))

Solution (Python):
N = int(input())

ans = 0

if N % 2 == 0:
    i = 0
    while True:
        x = N // (10 * (5 ** i))
        if x == 0:
            break
        i += 1
        ans += x

print(ans)

Solution (Python):
N = int(input())
 
ans = 0
 
if N%2 == 0:
    for i in range(100000000000):
        fact = 10 *(5 ** i)
        if fact<=N:
            ans+=int(N//fact)
        else:
            break
 
 
print(int(ans))

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000)


def solve(N):
    if N % 2 == 1:
        return 0
    s = 5
    ans = 0
    while N > s:
        ans += N // s // 2
        s = s * 5
    return ans


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


if __name__ == "__main__":
    main()

Solution (Python):


N = int(input().split()[0])

if N % 2 == 0:
    total_n = 0
    count = 1
    while True:
        p = (N // 2) // (5 ** count)
        total_n += p
        count += 1
        if p <= 0:
            break
    ans = total_n
else:
    ans = 0

print(ans)

Solution (Python):
'''
def a(b):
    if b <= 1:
        return 1
    return b*a(b-2)
'''
n = int(input())

count = 1

ans = 0
if n%2 == 1:
    print(0)
else:
    for i in range(50):
        kakeru = 10*5**i
        if kakeru <= n:
            ans += n//kakeru
            count *= 10
        else:
            break

    print(ans)

Solution (Python):
n = int(input())
if n % 2 == 1:
    print(0)
    exit(0)
lst = []
i = 1
while n >= 5 ** i:
    lst.append(n//(2 * (5**i)))
    i += 1
    
ans = 0
for i in range(len(lst)):
    ans += lst[i]
print(ans)

Solution (Python):
import math
N = int(input())
x = 10
cnt = 0
if N%2 == 1:
  print(0)
  exit()
while x <= N:
    cnt += (N//x)
    x *= 5
print(cnt)

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

Solution (Python):
N = int(input())
if N % 2 == 1:
    print(0)
    exit()

ans = 0
mod = 10

while (mod <= N):
    ans += N // mod
    mod *= 5

print(ans)

Solution (Python):
n=int(input())
if n%2==1:
    print(0)
else:
    n=(n//2)
    k=0
    while n>4:
        n=(n//5)
        k+=n
    print(k)

Solution (Python):
N=int(input())
if N%2==1:
  print(0)
  exit()
m=10
a=0
while m<=N:
  a+=N//m
  m=m*5
print(a)

Solution (Python):
n=int(input())
if n%2==1:
    print(0)
else:
    n=(n//2)
    k=0
    while n>0:
        k+=(n//5)
        n=(n//5)
    print(k)

Solution (Python):
N = int(input())
ans = 0

if N & 1:
    print(0)
    exit()
N //= 2
while N:
    N //= 5
    ans += N

print(ans)

Solution (Python):
N = int(input())

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

    print(ans)

Solution (Python):
n = int(input())
a = 0

if n % 2 == 0:
    j = 10
    while j <= n:
        a += n // j
        j *= 5



print(a)

Solution (Python):
n = input()

alpha = int(n[0])
beta = len(n) - 1

n = int(n)

if n % 2 != 0:
    print('0')
else:
    five = 0
    cnt = 1
    x = 5
    while x <= n:
        five += n // 10  // x
        cnt += 1
        x *= 5

    ans = n // 10 + five
    print(ans)

Solution (Python):
N = int(input())


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

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

Solution (Python):
N=int(input())



if N%2==1:
    print(0)
else:
    count=0
    i=0
    while 1:
        a=N//(10*(5**i))
        if a:
            count+=a
            i+=1
        else:
            break
    print(count)

Solution (Python):

import sys
import math
input = sys.stdin.readline

N = int(input())

if N == 0:
    print(0)
    sys.exit()
elif N == 1:
    print(0)
    sys.exit()
elif N % 2 == 1:
    print(0)
    sys.exit()

res = 0

temp = 10

while N >= temp:
    res += N // temp
    temp *= 5

print(res)

Solution (Python):
n=int(input())
if n%2==1:
  print(0);exit()
else:
  five=1;ans=0
  while True:
    five *=5
    if five>n:
      break
    ans+=n//(five*2)
  print(ans)

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()

if n < 10:
    print(0)
    quit()

if n % 2:
    print(0)
    quit()

else:
    ans = n//10
    tmp = 10
    while n//tmp > 0:
        tmp *= 5
        ans += (n//tmp)
    print(ans)

Solution (Python):
N=int(input())
if N%2==0:
  n=N//2
  k=1
  c=0
  while 5**k <= n:
    c=c+n//5**k
    k=k+1
  print(c)
else:
  print(0)

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

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

print(ans)

Solution (Python):
import sys
from pprint import pprint
import math

n = int(sys.stdin.readline().strip())
n_max = 10 ** 18

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

Solution (Python):
s=int(input())
list=[]
for i in range(25):
  list.append(pow(5,i+1)*2)
a=0
for j in range(len(list)):
  a+=s//list[j]
if s%2==1:
  print(0)
else:
  print(a)

Solution (Python):
N = int(input())

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

Solution (Python):
n=int(input())
if n%2==1:
    print(0)
    exit()
ans=0
t=10
while n>=t:
    ans+=n//t
    t*=5
print(ans)

Solution (Python):
N = int(input())

ans = 0

if N%2 == 0:
    for i in range(100000000000):
        fact = 10 *(5 ** i)
        if fact<=N:
            ans+= (N//fact)
        else:
            break


print(int(ans))

Solution (Python):
n = int(input())
a = n
count = 0
if n % 2 == 0:
    for i in range(1,26):
        count += (n // ((5**i)*2))
    print(count)
else:
    print(0)

Solution (Python):
n = int(input())

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

Solution (Python):
import sys
input  = sys.stdin.readline


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


if __name__ == '__main__':
    solve()

Solution (Python):

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

Solution (Python):
n=int(input())

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

Solution (Python):
N=int(input())
a=5
b=2
cnt_a=0
cnt_b=0
while a<N:
    cnt_a+=(N//a)//2
    a*=5
while b<N:
    cnt_b+=(N//b)//2
    b*=2
print(0 if N%2==1 else cnt_a)

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

Solution (Python):
n = int(input())
c = 0

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

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

Solution (Python):



def solve(*args: str) -> str:
    n = int(args[0])

    if n % 2 != 0:
        return '0'

    ret = 0
    d = 10
    while d <= n:
        ret += n//d
        d *= 5

    return str(ret)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Solution (Python):
import math
N = int(input())

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

total = 0

for i in range(1, 2+int(math.log(10**18, 5))):
  t = 5 ** i * 2
  total += N // t

print(total)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(read())

def F(N):
    if N & 1:
        return 0
    N //= 2
    x = 0
    while N:
        N //= 5
        x += N
    return x

answer = F(N)
print(answer)

Solution (Python):
N=int(input())
a=5
b=2
cnt_a=0
cnt_b=0
while a<N:
    cnt_a+=(N//a)//2
    a*=5
while b<N:
    cnt_b+=(N//b)//2
    b*=2
print(0 if N%2==1 else min(cnt_a,cnt_b))

Solution (Python):
def main():
    N=int(input())
    if N % 2 == 1:
        print(0)
    else:
        ans = 0
        tmp = N // 2
        while tmp != 0:
            tmp //= 5
            ans +=  tmp
        print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())

ans = 0

if N%2 == 0:
    for i in range(100000000000):
        fact = 10 *(5 ** i)
        if fact<=N:
            ans+= (N//fact)
        else:
            break


print(int(ans))

Solution (Python):
def f(n):
	if n % 2 == 1:
		return 0
	n = n // 2
	ans = 0
	while n:
		n = n // 5
		ans += n
	return ans

if __name__ == "__main__":
	n = int(input())
	print(f(n))

Solution (Python):
N = int(input())
l = len(str(N))
if N < 2:
    print(0)
elif N % 2 == 1:
    print(0)
else:
    ans = 0

    for i in range(2*l):
        ans += (N // (10 * (5**i)))
    print(ans)

Solution (Python):
N = int(input())

if N&1:
    print(0)
else:
    ans = N//10
    N//=10
    while N>0:
        ans += N//5
        N //=5
    print(ans)

Solution (Python):
n=int(input())

l=len(str(n))

q=int(0)
if n%2==1:
    q=0
else:
    for i in range(100):
        if n>(2*(5**(i+1)))-1:
            q +=n//(2*(5**(i+1)))


print(q)

Solution (Python):
N = int(input())

def func(n):
  if n < 5:
    return 0
  else:
    nn = int(n // 5)
    return nn + func(nn)

if N % 2 == 1:
  print(0)
else:
  print(func(int(N // 2)))

Solution (Python):
import math
N = int(input())

if N%2 != 0:
  answer = 0
else:
  answer = 0
  m = 1
  while int(N//(2*5**m))> 0:
    answer += int(N//(2*5**m))
    m += 1 
print(answer)

Solution (Python):
from fractions import gcd

from heapq import*
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7



def lcm(a, b):
    return a * b / fractions.gcd(a, b)


def main():


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




if __name__ == '__main__':
    main()

Solution (Python):
import math
N = int(input())

if N%2 != 0:
  answer = 0
else:
  answer = 0
  m = 1
  while N//(2*5**m) != 0:
    answer += math.floor(N//(2*5**m))
    m += 1 
print(answer)

Solution (Python):
n = int(input())

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

print(ans)

Solution (Python):
n=int(input())
s=0
if n%2==0:
    m=10
    while(n>=m):
        s+=n//m
        m*=5
print(s)

Solution (Python):
n = int(input())

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


n10 = n // 10
ans = n10
tmp = n10
i = 1
while tmp > 0:
    tmp = tmp // 5
    ans += tmp
    i += 1
print(ans)

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

Solution (Python):
N = int(input())

ans = 0

if N%2 == 0:
    for i in range(100000000000):
        if 10*(5**i)<=N:
            ans+=N//(10*(5**i))
        else:
            break


print(int(ans))