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())

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

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

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

Solution (Python):
def max_exponent(a, n):
    
    ret, v = 0, 1
    while a * v <= n:
        ret += 1
        v *= a
    return ret


def main():
    N = int(input())
    if N % 2 == 1:
        print(0)
        return
    
    count_5_in_even, pow_5 = 0, 5
    for k in range(1, max_exponent(5, N) + 1):
        count_5_in_even += (N // pow_5) // 2
        pow_5 *= 5
    count_2_in_even, pow_2 = 0, 2
    for k in range(1, max_exponent(2, N) + 1):
        count_2_in_even += N // k
        pow_2 *= 2
    print(min(count_5_in_even, count_2_in_even))


if __name__ == '__main__':
    main()

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

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

    print(res)

Solution (Python):

def main():
    n = int(input())
    if n%2 == 1:
        print(0)
        return
    
    five_cnt = 0
    for i in range(1,25+1):
        base = 2*(5**i)
        five_cnt += n//base

    print(five_cnt)

if __name__ == "__main__":
    main()

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

ans, tmp = 0, 5
if n % 2 == 0:
    n //= 2
    while tmp <= n:
        ans += n // tmp
        tmp *= 5
print(ans)

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

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

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

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

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

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


if n%2 == 1:
    print(0)
else:
    answer = 0
    count = 1
    n=n//2
    while 5**count <= n:
        answer += n//pow(5,count)
        count+=1
    print(answer)

Solution (Python):
import sys

N = int(input())

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

ans = 0
mul = 1
for i in range(1, 27):
    mul *= 5
    add = N // (2 * mul)
    if add == 0: break
    ans += add

print(ans)

Solution (Python):
def main():
    n = int(input())
    c = 0
    
    if n % 2 == 1:
        print(0)
        return 
    
    i = 10
    x, _ = divmod(n, i)
    while x:
        c += x
        i *= 5
        x, _ = divmod(n, i)

    print(c)


if __name__ == '__main__':
    main()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7

 
N = INT()


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

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

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

point = 0
now = 10

while now <= n:
    point += n//now
    now *= 5

print(point)

Solution (Python):
from  math import log,floor
n=int(input())

if n==0:
  print(0)
  exit(0)

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

f=floor(log(n,5))
ans=0
for i in range(f):
  t=n//(5**(f-i))
  ans+=t//2
print(ans)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(input())
    if n%2==1:
        print(0)
    elif n<10:
        print(0)
    else:
        ans=0
        for i in range(1,1000000):
            y=5**i
            num=(n//y)//2
            if num==0:
                break
            else:
                ans+=num
        print(ans)
resolve()

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

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

    N //= 2

    ret = 0
    while N > 0:
        N //= 5
        ret += N
    print(ret)


if __name__ == '__main__':
    main()

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

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

L=len(str(N))
ans=0
now=5
while N//now>0:
    ans+=((N//now)//2)
    now*=5
print(ans)

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

    print(cnt)

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

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

Solution (Python):
import sys
from collections import Counter
from collections import deque
import heapq
import math
import fractions
import bisect
import itertools
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

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

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

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

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

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

ans = 0
while N > 0:
    N //= 10
    ans += N
    for i in range(1, 100):
        ans += -(-(N // pow(5, i)) // 2)
print(ans)

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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,copy
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n = inp()
if n%2:
    print(0)
    quit()
res = 0
now = 10
while now <= n:
    res += n//now
    now *= 5
print(res)

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

Solution (Python):
n = int(input())
def double_fac(n):
    if n<=2:
        return 1
    return n*double_fac(n-2)
tmp=0
if n%2==1:
    ans=0
    print(ans)
else:

    r=1
    ans=0
    k=n
    while 10*r <= n:
        ans+=(n//(10*r))
        r*=5

    print(ans)

Solution (Python):
N=int(input())
if N%2==0:
  cnt = N//10
  div = 50
  while N>=div:
    cnt += (N//div)
    div *= 5
  print(cnt)
else:
  print(0)

Solution (Python):
import sys
N = int(input())
if N % 2 == 1:
    print(0)
    sys.exit()
x = 10
ans = 0
while N >= x:
    ans += N // x
    x *= 5
print(ans)

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

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

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

Solution (Python):
n = int(input())
if n % 2 == 0:
    i = 1
    ans = 0

    while True:
        now = n//(5**i * 2)
        if now > 0:
            ans += now
        if now < 1:
            break
        i+= 1
    print(ans)
else:
    print(0)

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

Solution (Python):

"""
Created on Sun May 31 15:35:55 2020

@author: NEC-PCuser
"""

N = int(input())

print()
if (N % 2 == 1):
    print(0)
else:
    i = N
    ans = 0
    count = 0
    while(i >= 5):
        i = i // 5 
        count += 1
    for i in range (count, 0, -1):
        ans += (N // ((5 ** i) * 2))
    print(ans)

Solution (Python):
def m():
    n = int(input())
    if n % 2 != 0: return 0
    i = 1
    ans = 0
    while True:
        tmp = n // (2*5**i) 
        if tmp == 0:
            break
        ans += tmp
        i+=1
    return ans

print(m())

Solution (Python):
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline



def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    N = gete(int)

    if N & 1 == 1:
        print(0)
        return

    base = 5
    n = N // 2
    ans = 0
    while base <= n:
        ans += n // base
        base *= 5

    print(ans)


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

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

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

    print(ans)

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

x = 5
ans = 0
while x <= n:
  ans += n//(2*x)
  x *= 5

print(ans)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    N = int(readline())
    if N%2 != 0:
        print(0)
        return
    k = 1
    cnt = 0
    while 1:
        p = pow(5, k)
        tmp = N//p
        if tmp == 0:
            break
        cnt += tmp//2
        k += 1
    print(cnt) 
if __name__ == '__main__':
    main()

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

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

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

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

    print(ans)

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

print(sum([n//(2*(5**i)) for i in range(1,50)]))

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

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

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

ans = 0
num = 10
while num <= n:
    ans += n // num
    num *= 5
print(ans)

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

Solution (Python):
import sys
input = sys.stdin.readline
from collections import *
from fractions import *

N = int(input())

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

two = 0

for p in range(1, 65):
    two += N//2**p

five = 0

for p in range(1, 65):
    five += N//(2*5**p)

print(min(two, five))

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
def gcd(a,b):
    if b == 0:
        return a
    return gcd(b,a%b)

def main():
    N = int(input())
    if N%2 == 1:
        print(0)
    else:
        t = 2*5
        s = 0
        while t <= N:
             s += N//t
             t *= 5
        print(s)
if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):



import sys

def input():
    return sys.stdin.readline().rstrip('\n')




N = int(input())

def nrof_divided_by(n, d):
    return n//d

def ndiv_list(n, d):
    l = []
    for i in range(n):
        _d = d**(i+1)
        if _d > n:
            break
        l.append(n//_d)
    return l
    
nrof_factor10 = ndiv_list(N//2,10)
nrof_factor5 = ndiv_list(N//2,5)
nrof_factor2 = ndiv_list(N//2,2)

if N % 2 == 1:
    print(0)
else:
    print(sum(nrof_factor5))

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

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

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())
if n%2!=0:
  print(0)
else:
  n1 = int(n//2)
  cou = 0
  i = 1
  while n1>=5**i:
    cou += n1//(5**i)
    i += 1
  print(cou)

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

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

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

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

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

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


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

def g(n):

	if n % 2 == 1: return 0

	return f(n/2)
print g(n)

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):
n = int(input())
if n % 2 == 1:
    print(0)
    exit()

n = n // 10
score = n
while n > 4:
    n //= 5
    score += n
print(score)

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

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

    print(ans)

Solution (Python):
import math

N = int(input())

if N % 2 == 0:
    ans = 0
    for i in range(0, 26):
        ans += N // (5 ** i * 10)

    print(ans)
else:
    print(0)

Solution (Python):
import sys
import  math
import fractions
from collections import defaultdict
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

N=int(input())

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

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

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

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

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

if N%2:
    ans = 0
else:
    ans = 0
    while N > 1:
        N = N//5
        ans += N//2

print(ans)

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

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

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

Solution (Python):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**6)
INF = float('inf')
MOD = 10 ** 9 + 7
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rf(): return float(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]
def rf_(): return [float(_) for _ in rs().split()]
def divisors(n, sortedresult=True):
    div = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            div.append(i)
            if i != n // i:
                div.append(n//i)
    if sortedresult:
        div.sort()
    return div

N = ri()
if N % 2 == 1:
    print(0)
    exit()
print(sum([N // (2 * (5 ** i)) for i in [j for j in range(1, 100)]]))

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    N = int(readline())
    if N%2==1:
        print(0)
    else:
        ans = 0
        for i in range(1,100):
            ans += N//((5**i)*2)
        print(ans)
if __name__ == '__main__':
    main()

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

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

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

n = n // 10
res = n * 1

while n > 1:
    n //= 5
    res += n
print(res)

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

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

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

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

Solution (Python):



import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

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

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

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

counter=0
i=1
while True:
    tmp = (n // 5**i)//2
    if tmp == 0:
        print(counter)
        sys.exit()
    else:
        counter += tmp
        i += 1

Solution (Python):


n = int(input())

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

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

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

N //= 2
res = 0
for i in range(100):
    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(25):
        ans+=n//(10*5**i)
    print(ans)

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

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


def readstr():
    return input().strip()


def readint():
    return int(input())


def readnums():
    return map(int, input().split())


def readstrs():
    return input().split()


def main():
    N = readint()
    if N % 2:
        print(0)
    else:
        ans = 0
        i = 1
        while N >= 5 ** i:
            ans += (N // 5 ** i) // 2
            i += 1
        print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
"""
def f(n):
    if n < 2:
        return 1
    else:
        return n*f(n-2)
"""
n = int(input())
if n%2 == 1:
    print(0)
else:
    n -= n%10
    res = 0
    tmp = 10
    while tmp <= n:
        res += n // tmp
        tmp *= 5
    print(res)

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

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

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

print(ans)

Solution (Python):
N=int(input())
sum=0
k=1

if N%2 != 0:
    pass
else:
    while True:
        if N // (2*(5**k)) ==0:
            break
        else:
            sum += N//(2*(5**k))
            k+=1
print(sum)

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

if n % 2 == 0:
    res = 0
    i = 10
    while i <= n:
        res += n // i
        i *= 5
    print(res)
else:
    print(0)

Solution (Python):
def solve(N):
   if N < 9 or N % 2:
       return 0
   ret = 0
   N //= 2
   while N:
       ret += N // 5
       N //= 5
   return ret

if __name__ == "__main__":
    N = int(input())
    print(solve(N))

Solution (Python):
import sys
a=int(input())
if a%2==1:
  print(0)
  sys.exit()
i=10
ans=0
while i<=a:
  ans+=a//i
  i*=5
print(ans)

Solution (Python):
import sys

sys.setrecursionlimit(10**6)

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

def g(n):
    m = int(str(n)[:-1])
    ans = 0
    for i in range(30):
        tmp = m//pow(5, i)
        if tmp == 0:
            break
        ans += tmp
    return ans


def main():
    N = int(input())
    if N < 10:
        print(0)
        return
    if N%2==1:
        print(0)
        return
    print(g(N))


if __name__ == "__main__":
    main()

Solution (Python):
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n = int(input())
    if n % 2 != 0:
        print(0)
    else:
        f = [2] * 30
        for i in range(29):
            f[i + 1] = 5 * f[i]
        ans = 0
        for i in range(1, 30):
            ans += (n // f[i])
        print(ans)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Solution (Python):
import sys
a=int(input())
if a%2==1:
  print(0)
  sys.exit()
i=10
ans=0
while i<=a:
  ans+=a//i
  i*=5
print(ans)

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

    print(s)
else:
    print(0)

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

    import math
    N = int(input())

    if N % 2 != 0:
        print(0)
        exit()
    else:
        num_zeros = N // 10
        N_head = N//10
        for i in range(1, 25):
            num_zeros += (N_head)//(5**i)
    print(num_zeros)


if __name__ == "__main__":
    main()

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

Solution (Python):

def A027868(n):
    return 0 if n < 5 else n // 5 + A027868(n // 5)


def ABC148E(n):
    if n % 2 == 1:
        print(0)
    else:
        print(A027868(n // 2))

n = int(input())
ABC148E(n)

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

count = 0
if N%2==1:
    print(0)
    exit()
powNum = 1
while 2*pow(5,powNum) <= N:
    count += N//(2*pow(5,powNum))
    powNum+=1
print(count)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n = int(read())
if n % 2 == 1:
    print(0)
    exit()
cnt = 0
n //= 2
while n:
    n //= 5
    cnt += n
print(cnt)

Solution (Python):
import fractions


N = int(input())
if N == 0:
  print(0)
elif N % 2 == 1:
  print(0)
else:
  ans = 0
  log = int(fractions.math.log(N//2,5))
  for l in range(1,log+1):
    power = 5**l
    ans += (N//2) // power
  print(ans)

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

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

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

if n%2==1:
    print(0)
else:
    to_search = [2*5**i for i in range(1,30)]
    print( sum(n//s for s in to_search) )

Solution (Python):
def main():
    N = int(input())
    if N%2 != 0:
        print(0)
        return
    output = 0
    T = 10
    while N//T > 0:
        output += N//T
        T *= 5
    print(output)
    return

if __name__ == '__main__':
    main()

Solution (Python):

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

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

print(ans)

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

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

x = int(input())
print(0 if x%2 else f(x//2))

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

Solution (Python):
import sys
n = int(sys.stdin.readline().rstrip())
if n%2:
    print(0)
else:
    ans = 0
    n //= 10
    while n > 0:
        ans += n
        n //= 5
    print(ans)

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

Solution (Python):
n = int(input())
def solve(n):
  if n < 2:
    return 1
  else:
    return n*solve(n-2)

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

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

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

mul_5 = 0
ans = 0
while n > 2 * 5**mul_5:
    mul_5 += 1
if n % 2 == 0 and mul_5 > 0:
    for i in range(mul_5):
        ans += n // (2 * 5**(i+1))

print(ans)

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

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

Solution (Python):
n = input()
l = len(n)
n = int(n)
import math
if n % 2 == 1:
  print(0)
else:
  c = 0
  for i in range(1, 100):
      c += n // 5**i // 2
  print(c)

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

Solution (Python):
import numpy as np
import functools
import math
import scipy
import fractions
import itertools

def solve():
    n = int(input())
    if n % 2 != 0:
        print(0)
    else:
        i = 5
        ans = 0
        while i <= n:
            ans += n // (i*2)
            i *= 5
        print(ans)
    return 0

if __name__ == "__main__":
    solve()

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

if (n % 2) != 0:
    print(0)
else:
    ans = 0
    k = 0
    m = len(str(n))
    while( n >= 10*(5**k)):
        ans += (n//(10*(5**k)))
        k+=1
    print(ans)

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

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

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

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

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

cnt = 0

for i in range(26):
  cnt += N // (5 ** (i + 1) * 2)

print(cnt)

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

ans = 0
i = 1
while n // (2 * 5 ** i) != 0:
    ans += n // (2 * (5 ** i))
    i += 1

print(ans)

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

if __name__ == '__main__':
    main()