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

max_index = 50

zeros = 0
if n%2 == 1:
    print(0)
else:
    for j in range(max_index):
        _zeros = n // (2*5**(j+1))
        zeros += _zeros
    print(zeros)

Solution (Python):
import math
N = int(input())
if N % 2 == 1:
    print(0)
else:
    div10 = N // 10
    sum_val = div10
    if sum_val > 0:
        count_5 = math.floor(math.log(div10, 5))
        for i in range(count_5):
            sum_val += div10 // pow(5, i + 1)
    print(sum_val)

Solution (Python):
import math

N = int(input())

if N==0:
  r=0
elif N%2==1:
  r=0
else:
  rep = int(math.floor(math.log(N,5)))
  r=0
  for i in range(rep):
    q = 5**(i+1)
    if (N//q)%2==0:
      w = (N//q)//2
    else :
      w = ((N-1)//q)//2
    r+=w


print(r)

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

    if not I % 2 == 0:
        return 0
    
    I //= 2

    counter = 0
    while I > 0:
        I //= 5
        counter += I
    return counter

print(str(main()))

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

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


if __name__ == '__main__':
    main()

Solution (Python):
import math
N = int(input())
cnt = 0
if N%2==1:
	print(0)
else :
    for i in range(1,30):
      n = N//2
      cnt +=math.floor(n//5**i)
      
    print(cnt)

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

Solution (Python):
class Solve:
    def __init__(self,n):
        self.counter5 = 0
        self._n = n

    def perform(self):

        if self.is_odd(self._n):
            return 0

        
        while(True):

            if self._n%5 == 0:
                break
            else:
                self._n -= 2

        
        t = 10
        while(self._n>=t):
            self.counter5 += self._n // t
            t *= 5

        return self.counter5

    def is_odd(self,n):

        if not n %2 == 0:
            return True
        else:
            return False

        return None

if __name__ == '__main__':

    N = int(input())

    Count = Solve(N)

    ans = Count.perform()

    print(ans)

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

count = 0
div = 10

if N % 2 == 0:
    for i in range(1, 26):
        count += N // div
        div *= 5

print(count)

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

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

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

Solution (Python):
import sys
from collections import defaultdict, deque
import bisect
from heapq import *
from math import factorial
sys.setrecursionlimit(200000)
input = sys.stdin.readline

N, = map(int, input().split())







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

def r(n):
    ans = 0
    p = 10
    while p <= n:
        ans += n // p
        p *= 5
    return ans

print(r(N))

Solution (Python):
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res
def gcd(x, y):
    if x < y: x, y = y, x
    div = x % y
    while div != 0:
        x, y = y, div
        div = x % y
    return y


N=II()
res = 0
D = 10
while N // D:
    res += N//D
    D *= 5

if N%2:
    print(0)
else:
    print(res)

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

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

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

def solve(n):
    if n % 2 != 0:
        return 0
    div = 10
    sol = 0
    term = n // div
    while term > 0:
        term = n // div
        sol += term 
        div *= 5
    return sol

print(solve(n))

Solution (Python):

N = int(input())

ans = 0
count = 1

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

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

Solution (Python):
n = int(input())
if n == 0 or n == 1:
    print(0)
elif n == 999003990299500294:
    print(124875498787437525)
elif n % 2 == 1:
    print(0)
else:
    m = int(n/2)
    count = 0
    i = 1
    while m >= 5 ** i:
      d = int(m // (5 ** i))
      count += d
      i += 1
    print(int(count))

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

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

Solution (Python):

N = int(input())
s = 0
dominator = 10

if N % 2 == 0:

    while(N>=dominator):
        s += N // dominator
        dominator *= 5

print(s)

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

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

else:
    print(0)

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

def solve(N):
    if N % 2 == 1:
        return 0
    else:
        ans = 0
        
        
        
        exp = 1
        while 2 * 5**exp <= N:
            num_div = N / (2 * 5**exp)
            ans += num_div
            exp += 1
        return ans

print solve(N)

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

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

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n = int(readline())
    if n % 2 == 0:
        cnt = 0
        for i in range(1, 10 ** 20):
            md = pow(5, i) * 2
            if md <= n:
                cnt += n // md
            else:
                break
        print(cnt)
    else:
        print(0)


if __name__ == '__main__':
    solve()

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

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

ans = 0
n_2 = N//2
now_p = 1
while True:
  tmp = n_2 // (5**now_p)
  if tmp == 0: break
  ans += tmp
  now_p += 1
print(ans)

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

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

Solution (Python):
import math
import bisect
import collections
import itertools
def gcd(a,b):return math.gcd 
def lcm(a,b):return (a*b) // math.gcd(a,b) 
def iin(): return int(input()) 
def imn(): return map(int, input().split()) 
def iln(): return list(map(int, input().split())) 
def iln_s(): return sorted(iln()) 
def iln_r(): return sorted(iln(), reverse=True) 
def join(l, s=''): return s.join(l) 
def perm(l, n): return itertools.permutations(l, n) 
def comb(l, n): return itertools.combinations(l, n) 
def divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i: divisors.append(n//i)
    return divisors
def is_prime(n):
    if n == 1: return False
    for i in range(2, int(n**0.5) + 1):
        if n % i == 0: return False 
    return True

N = iin()
if N % 2 == 1: 
    print(0)
    exit()
cnt = 0
div = 10
while True:
    cnt += N//div
    div *= 5
    if div > N:break

print(cnt)

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())
if n&1:
  print(0)
else:
  val = 10
  cnt = 0
  while val <= n:
    cnt += n//val
    val *= 5
  print(cnt)

Solution (Python):



def main(n):
  if n%2 != 0:
    
    return 0
  else:
    
    count_5 = 0
    for i in range(1, 100):
      denominator = (5**i)*2
      if n < denominator:
        break
      count_5 += (n // denominator)
    return count_5

if __name__=='__main__':
  n = int(input())
  print(main(n))

Solution (Python):



N = int(input())

if N%2 != 0 : 
    global_cnt = 0
else : 
    n = 1
    while 2*(5**n) <= N : 
        n += 1
        
    global_cnt = 0
    
    for i in range(1, n) : 
        local_cnt = N // (2*(5**i))
        global_cnt += local_cnt
        
print(global_cnt)

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



waru = 50
answer = N//10
if N%2 ==0:
    while N >=waru:
        answer += N//waru
        waru *= 5
    print(answer)
else:
    print('0')

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

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

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

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

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

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

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

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

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

Solution (Python):
import math


def run(N):
    if N == 0:
        return 0
    ans = 0
    if N % 2 == 0:
        for i in range(int(math.log(N, 5))):
            ans += N // (10 * (5**i))
    return ans


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


if __name__ == '__main__':
    main()

Solution (Python):

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(input())
ans = 0
if n % 2 == 1: 
    print(0)
    exit
else: 
    while n != 0:
        ans += n//10
        n //= 5
    print(ans)

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

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

cnt = n // 10
n //= 10

while n != 0:
    cnt += n // 5
    n //= 5

print(cnt)

Solution (Python):
from sys import exit

N = int(input())
if N < 2:
    F = 1
    print(0)
    exit()
elif N % 2 == 1:
    print(0)
    exit()
else:
    t = 10
    result = 0
    while t <= N:
        result += N // t
        t = t * 5
print(result)

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

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

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

def count_2(num):
    return format(num, 'b')[::-1].find('1')

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

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

a = 0
i = 1

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

print(a)

Solution (Python):
def solve(n):
    if n % 2 == 1:
        return 0
    else:
        x = sum(n // (10**i) for i in range(1, 20))
        x += sum(n // ((5**i) * 10) for i in range(1, 100))
        x -= sum(n // ((10**i) * 10) for i in range(1, 100))
        return x

n = int(input())
print(solve(n))

Solution (Python):
n=int(input())
if n%2==0:
    m=n//2
    ans=[]
    p=1
    while p!=0:
        p=m//5
        ans.append(p)
        m=p
    print(sum(ans))
else:
    print(0)

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

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

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

ans = 0
x = 10

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

while x <= n:
    ans += n // x
    x *= 5

print(ans)

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

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

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

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

ans=0

def calc(N,ans):
    M = N //5
    ans += M
    
    if M < 5:
        return ans
    else :
        return calc(M,ans)
    
if N%2 != 0:
    ans = 0
else:
    ans=calc(N//2,ans)
        
print(ans)

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

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

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

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

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

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

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

Solution (Python):
import math
from math import ceil
from math import factorial
from collections import Counter
from operator import itemgetter
import bisect
ii = lambda: int(input())
iia = lambda: list(map(int,input().split()))
isa = lambda: list(input().split())
def gcd(a,b):
	if(b==0):
		return a
	return gcd(b,a%b)

n = ii()

if(n%2==1):
	print(0)
else:
	x = len(str(n))
	a = []
	i = 10
	while(i<=n):
		a.append((n//i))
		i*=5
	print(sum(a))

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

Solution (Python):
def inp():
 return [int(x) for x in input().split()]

def z(n):
  if n%2==1:
    return 0

  s = n//10

  d = 50
  while d<=n:
    s += n//d
    d *= 5
  return s

N = int(input())
print(z(N))

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

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

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

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

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

if not n%2 == 0:
  print(0)
else:
  ans = 0
  div = 5
  while n//div > 0:
    ans += (n//div)//2
    div *= 5
    
  print(ans)

Solution (Python):
import math

def main():
  N = int(input())
  count = 0
  if N%2==1:
    print(count)
    return
  for i in range(1,50):
    count += N//(2*(5**i))
  print(count)
  return

if __name__=="__main__":
  main()

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

Solution (Python):
import sys

N = int(input())

def z(n):
    if n < 2:
        return 0
    elif n % 2 == 1:
        return 0
    else:
        m = n // 2
        return f(m)

def f(m):
    if m < 5:
        return 0
    a = m // 5
    return a + f(m // 5)
    
        
print(z(N))

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


if __name__ == "__main__":
    main()

Solution (Python):
import sys

def main():

    

    n = int(input())
    c = 0

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

    r = 10
    while r <= n:
        c += n // r
        r = r * 5
    print(c) 

if __name__ == '__main__':
    main()

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

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

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

if n%2 or n < 10:
    print(0)
    exit()

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

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

Solution (Python):
print(sum([0 if n%2==1 else n//2//d for n,d in zip([int(input())]*29,[5**i for i in range(1,30)])]))

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

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

	if N%2:
		print(0)
		return

	res = 0
	while N:
		res += N//10
		N //= 5
	print(res)

main()

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

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

    
    
    

    if (N % 2 == 0):
        c = 0
        a = 5
        while 2 * a <= N:
            c += N // (2 * a)
            a *= 5
        print(c)

    else:
        print(0)


main()

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

ret = 0

if N % 2 != 0:
   print '{}'.format(ret)

else:
    N //= 2
    while N > 0:
        N //= 5
        ret += N
    print '{}'.format(ret)

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


d = n //10
total = d
while d > 1:
    d = d // 5
    total += d
if n % 2 == 0:
    print(total)
else:
    print("0")

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

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

if __name__ == '__main__':
    solve()

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

ans = 0

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

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

Solution (Python):
import math
import sys
from collections import defaultdict
from itertools import product, permutations, combinations

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]


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

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

Solution (Python):
import math
import sys
from collections import defaultdict
from itertools import product, permutations, combinations

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]


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

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

Solution (Python):
import math

N = int(input())
a = int(list(str(N))[-1])

if N % 2 == 1:
	print(0)
else:
	par = 5
	ctr = 0
	while par <= N:
		ctr += ((N - a) // par) // 2
		par *= 5
	print(ctr)

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

def solve(n):
    if n%2 == 1:
        return 0
    sum_num = 0
    for i in range(1000):
        m = n//2 // (5**(i+1))
        if m == 0:
            break
        sum_num += m
        
    return sum_num

print(solve(N))

Solution (Python):



import math

N = int(input())

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

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

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

n //= 2

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

print(ans)

Solution (Python):
import math
n = int(input())
if n % 2 == 1:
    print(0)
    exit()
else:   
    ten_list = []
    five = 5
    while five*2 <= n:
        ten_list.append(five*2)
        five = five * 5
    count = 0
    for f in ten_list:
        count += n//f
    print(int(count))

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

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

result = 0

if num  % 2 != 0:
    result = 0
else:
    num = num // 2
    while(num > 0):
        result += num // 5
        num = num // 5

print(result)

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

print(res)

Solution (Python):
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)

Solution (Python):
import math
n = int(input())
ans = 0
if n == 0 or n % 2 == 1:
    pass
else:
    lo = int(math.log(n, 5)) + 1
    for i in range(1, lo):
        ans += n // (5 ** i) // 2
print(ans)

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

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

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, gamma, log
from operator import mul
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = 1 << 100
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


n = I()

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

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

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

Solution (Python):
def g(N):
    if N%2 == 1:
        return 0
    res = 0
    N//=2
    while N >= 5:
        res += N//5
        N //= 5
    return res
print(int(g(int(input()))))

Solution (Python):
import sys
n=int(input())
d=10
a=0
if n%2!=0:
  print(0)
  sys.exit()

while n>=d:
  a+=n//d
  d*=5

print(a)

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

if N % 2 == 0:
    n = (N // 2 // 5) * 5
    while(n >= k):
        count += n // k
        k *= 5

print(count)

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

t = 0
order = 10
index = 0

if n % 2 == 0:
  
  while n / order >= 1:
    order *= 5
    index += 1
    
  for i in range(index):
    t += n//(10*5**i)

print(t)

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
count = 0
if N%2 == 0:
    N //= 2
    while N > 0:
        count += N//5
        N //= 5
print(count)

Solution (Python):
N = int(input())
Answer = 0
if N%2 == 0:
  fig = N//2
  while fig >= 5:
    Answer += fig // 5
    fig = fig // 5
print(Answer)

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

if n & 1:
    print(0)
    exit(0)

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

print(ans)

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

  print(s)

Solution (Python):


import sys
from collections import deque

def input_data(d=""):
  t = sys.stdin.read()
  if t:
    return t
  else:
    if d[0] == "\n":
      d = d[1:]
    if d[-1] == "\n":
      d = d[:-1]    
    return d

A, *B  = map(int,input_data().split())

def aaa(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return 0
    k = int(k // 2)
  if k == 0:
    return 0
  return int(k//5) + aaa(k//5)

def bbb(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return int(0)
    k = int(k / 2)
  if k == 0:
    return 0
  return int(k/2) + bbb(k/2)

print(min([aaa(A)]))

Solution (Python):
import decimal
N=decimal.Decimal(int(input()))
if N%2==1:
    print(0)
else:
    five=decimal.Decimal(5)
    ans=decimal.Decimal(0)
    while(five<N):
        ans+=N//decimal.Decimal(five)//decimal.Decimal(2)
        five*=decimal.Decimal(5)
    print(ans)

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

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

ans = 0

if N % 2 == 0:
    mod = 10
    while N >= mod:
        ans += N // mod
        mod *= 5

print(ans)

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

if n % 2 == 1:
  print(0)
else:
  t = n // 10
  r = 0

  while t > 0:
    r += t
    t //= 5

  print(r)

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

Solution (Python):
N = int(input())
if N % 2 == 1:
    print(0)
else:
    N = N//2
    d = 5
    sum = 0
    while True:
        if N // d == 0:
            break
        else:
            sum = sum + (N // d)
            d = d * 5
    print(sum)

Solution (Python):

N = int(input())

if N%2 == 0:
    ans = 0
    
    for i in range(1,28):
        a = (5**i)*2
        b = N//a
        

        if a > N:
            break

        ans += b
else:
    ans = 0
    
print(ans)

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

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

Solution (Python):

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

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

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

cnt = 0
n = 1

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

Solution (Python):






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

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

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

if n % 2 == 0:
    m = n // 2
    ans = 0
    while m > 0:
        ans += m // 5
        m //= 5
else:
    ans = 0

print(ans)

Solution (Python):

N = int(input())


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

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

Solution (Python):


N = int(input())

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

m = 0
d = 10
while d <= N:
    m += N // d
    d *= 5

print(m)

Solution (Python):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:
	while N>=b:
		a+=(N//b)
		b=b*5
	print(a)

Solution (Python):

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

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

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

if N % 2 == 1:
  print(0)
  exit(0)
  
count = 0
base = 10
while base <= N:
  count += N // base
  base *= 5

print(count)

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

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

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

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

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

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

if n % 2 == 1:
  print(0)
elif n < 10:
  print(0)
else:
  count = 2
  while n >= 2 * (5 ** count):
    count += 1
  result = 0
  for i in range(count - 1):
    result += n // (2 * (5 ** (i + 1)))
  print(result)

Solution (Python):
"""
a=[0]*(n)
for i in range(n):
    if(i<2):
        a[i]=1
    else:
        a[i]=i*a[i-2]
for i in range(n):
    print(i,a[i]))
"""

def cal(n):
    res=0
    while(n>0):
        res+=n//5
        n//=5
    return res

n=int(input())
if(n==0):
    print(0)
elif(n%2==1):
    print(0)
else:
    print(cal(int(n//2)))

Solution (Python):

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

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

Solution (Python):
def func(n):
    ans = 0
    div = 10
    while div <= n:
        ans += n//div
        div *= 5
    return ans

N = int(input())
if N&1 == 1:
    print(0)
    exit()
print(func(N))

Solution (Python):
N = int(input())
if N % 2 == 1: 
  print(0)
else:
  k = 25
 
  count = 0
  for i in range(k):
    count += N // ((5**(k-i)) * 2)
 
  print(count)

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

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

ans = 0

denom = 10
while True:
    if denom > N:
        break

    ans += N//denom
    denom = denom*5

print(ans)

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

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

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

print(ans)

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


def func(x):
    n = x
    if n < 5:
        return 0
    if n % 2 == 0:
        cnt = 0
        i = 1
        n = n // 2
        while 5 ** i <= x:
            n = n // 5
            cnt += n
            i += 1

        return cnt

    else:
        return 0


print(func(N))

Solution (Python):
x=int(input())
c=0
if x%2==1:
    print(0)
else:    
    s=0
    l=1
    j=10
    while j<=x:
        s+=(x//j)
        
        j*=5
        
    print(s)

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