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
K = N//2

if N%2 == 1:
    Ans = 0

else:
    while K//5 >0:
        Ans += K//5
        K = K//5
print(Ans)

Solution (Python):

n = int(input())
if (n%2==1):
    print (0)
    exit()
n//=2
ls_p = []
p = 5
while(p<10e+18):
    ls_p.append(p)
    p*=5

print (sum([n//p for p in ls_p]))

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

c=0
if N%2==0:
  m=10
  while N//m>0:
    c+=N//m
    m*=5

print(c)

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

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

if n%2==1:
    print("0")
    exit()
    
for i in range(1,50):
    an+=(n//((5**i)*2))

print(an)

Solution (Python):

import re
import math
import fractions
import numpy as np

def C(n,a):
    if(n==0):return 0
    else:
        return n//a+C(n//a,a)


n=int(input())
if(n%2==1):
    print(0)
else:
    print(C(n//2,5))

Solution (Python):



import sys
input = sys.stdin.readline

def main():
    N = int(input())
    
    
    if N%2:
        print('0')
        quit()
    
    def calc(x,ans):
        fl = 2*(5**x)
        if N >= fl:
            ans += N//fl
            return calc(x+1,ans)
        else:
            return ans
    
    print(calc(1, 0))
        
    
    
if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())
c=N%10
if c%2==1:
  print("0")
else:
  i=1
  b=0
  while i<=100:
    b+=N//(2*(5**i))
    i+=1
  else:
    print(b)

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

if (N % 2) == 0:
    while True:
        count += N // mul
        mul *= 5
        if mul > N: break
    print(count)
else:
    print(0)

Solution (Python):
def answer(n):
  if n % 2 == 1:
    return 0
  else:
    ans = 0
    A = 10
    while n >= A:
      ans += n // A
      A *= 5
    return ans  

print(answer(int(input())))

Solution (Python):



import sys

n = int( input() )

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

ans = 0
i = 0

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

print(ans)

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

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

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


if n % 2 == 1:
    print(0)
else:
    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:
    ans = 0
    for i in range(1, 26):
        if 5 ** i < n:
            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(26):
        ans += n // (2 * 5 ** (i + 1))
    print(ans)

Solution (Python):
from functools import lru_cache


@lru_cache()
def cal(x):
    if x & 1 or x == 0:
        return 0
    else:
        now = (x // 10) * 10
        now //= 5
        return now // 2 + cal(now)


n = int(input())
print(cal(n))

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

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

n = int(input())

print(p(10) if n%2==0 else 0)

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


def findTrailingZeros(n):
    
    count = 0

    i = 10

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

    return count


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

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

Solution (Python):
n = int(input())
ans = 0
if n & 1:
    print(0)
    exit(0)
for i in range(100):
    tmp = pow(5, i) * 10
    contrib = n//tmp
    if contrib == 0:
        break
    ans += contrib
print(ans)

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

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


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

def k_change():
	global k
	k = k*5


def func(n):
	global ans,k
	
	if n < k:
		print(ans)
		exit()
	ans += n//k
	k_change()
	func(n)

func(n)

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

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

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

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

Solution (Python):
n = int(input())
fives = n
cnt = 0
cnt2 = 0

if n%2 == 0:
  while (1):
    if fives // 5 > 0:
      fives //= 5
      cnt += 1
    else:
      break

for i in range(cnt):
  cnt2 += n // (2*5**(i+1))

print(cnt2)

Solution (Python):
n, r = divmod(int(input()),2)
ans = 0
i = 1

if not r:
    while n >= 5**i:
        ans += n//(5**i)
        i += 1
print(ans)

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

Solution (Python):
n_2,r= divmod(int(input()),2)
ans=0
i=1
if not r:
  while n_2 >= 5**i:
    ans += n_2//(5**i)
    i+=1
print(ans)

Solution (Python):
import sys

N = int(input())

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

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

print(ans)

Solution (Python):
import sys
N = int(input())
if N % 2 != 0:
    print(0)
    sys.exit()

answer = 0
for i in range(36, 0, -1):
    n = 5 ** i
    answer += (N // n // 2)
print(answer)

Solution (Python):
def wczytaj_liste(): 
    wczytana_lista = input()
    lista_znakow = wczytana_lista.split()
    ostateczna_lista = []
    for element in lista_znakow:
        ostateczna_lista.append(int(element))
    return ostateczna_lista

def Double_Factorial():
    N = wczytaj_liste()[0]
    if N < 10: 
        print (0)
    elif N%2 == 1: 
        print(0)
    else:
        podzielnik = 10
        wynik = 0
        while podzielnik <= N:
            wynik += N//podzielnik
            podzielnik *= 5
        print(wynik)
            
Double_Factorial()

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

def formula(x, p):
    return 0 if p>x else (x//p)+formula(x//p,p)

def calc(x):
    two = x//2
    two += formula(x//2, 2)
    five = formula(x//2, 5)
    return min(two, five)

print("%d"% (0 if n%2==1 else calc(n)) )

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

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

def g2(n, p):
    if n%2 == 1:
        return g1(n,p) - g2(n-1, p)
    res = g1(n//2, p)
    if p == 2:
        res += n//2
    return res
        
ans = min(g2(n,2), g2(n,5))
print(ans)

Solution (Python):

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

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

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

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

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

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

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

Solution (Python):

import sys
import math

def solve(N: int):
    ans=0
    if N%2==0:
        n5=10
        while(N>=n5):
            ans+=max(0,N//n5)
            n5*=5
    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):


import sys


test = ""

"""
1000000000000000000
124999999999999995
"""

test = list(reversed(test.strip().splitlines()))
if test:
    def input2():
        return test.pop()
else:
    def input2():
        return input()

        

n = int(input2())
if n % 2:
    print(0)
    sys.exit()
    
    
ans = 0
i = 0
while (10 * 5**i) <= n:
    ans += n // (10 * 5**i)
    i += 1

print(ans)

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

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

Solution (Python):
N = int(input())
if N % 2:
  print(0)
else:
  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:
    ans = 0
    cnt = 10
    while True:
        if N >= cnt:
            ans += N // (cnt)
            cnt *= 5
        else:
            break
    print(ans)

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

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

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

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

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

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

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

def main(N):
    if N % 2 == 1:
        print(0)
        return
    n = 1
    ans = 0
    N //= 2
    while N:
        N //= 5
        ans += N
    print(ans)

if __name__ == "__main__":
    main(N)

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

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

f = 10
ans = 0
while f <= n:
    ans += n // f
    f *= 5

print(ans)

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

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

ans = 0
tmp_list = [0] * 40
for i in range(40):
    tmp_list[i] = N // (10 * 5 ** i)
ans = sum(tmp_list)
print(ans)

Solution (Python):


N = int(input())

def g1(n, p):
    if n == 0:
        return 0

    return n // p + g1(n // p, p)


def g2(n, p):
    if n % 2 == 1:
        return g1(n, p) - g2(n - 1, p)
    res = g1(n // 2, p)
    if p == 2:
        res += n // 2
    return res


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

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

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

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

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

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

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

print(cnt)

Solution (Python):

n = int(input())

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

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

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

while N/tmp >= 1:
    ans += N//tmp
    tmp *= 5
print(ans)

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

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

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

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

print(ans)

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

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

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

print(ans)

Solution (Python):
def main():
    N = input()
    if int(N) % 2 == 1:
        print(0)
        exit()
    cnt5 = 0
    for i in range(1,100):
        tmp =  int(N) // (5 ** i)
        cnt5 += tmp // 2
    print(cnt5)


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
if n % 2 != 0:
    ans = 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)
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()
    

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

print(ans)

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

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

if N%2==1:
    print(0)
else:
    half_N = N//2
    count = 0
    ord = 1

    temp_count = half_N//(5**ord)
    count += temp_count
    while temp_count>0:
        ord += 1
        temp_count = half_N//(5**ord)
        count += temp_count
    print(count)

Solution (Python):
max_n = 10**18

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

Solution (Python):
import math
n = int(input())
 
if n%2 == 1:
  print(0)
else:
  out = 0
  n //= 2
  x = math.log((10**18)//2, 5)
  for i in range(math.floor(x)):
    out += n // 5**(i+1)
 
  print(out)

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

if n%2 == 1:
  print(0)
else:
  out = 0
  n //= 2
  x = math.log((10**18)//2, 5)
  for i in range(math.floor(x)):
    out += n // 5**(i+1)

  print(out)

Solution (Python):
N = int(input())
i = len(str(N))-1

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

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

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 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 LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def main():
    s = S()
    N = int(s)
    if N % 2 == 1:
        print(0)
        return
    dig = len(s)
    cnt = 0
    for i in range(1, 36):
        if 5 ** i > N//2:
            break
        cnt += (N // 2) // (5**i)
    print(cnt)
main()

Solution (Python):
import math
def calc(n,x):
    return n//x

n=int(input())
if n%2==1 or n==0:
    print(0)
else:
    ans=0
    m=10
    while m<=n:
        ans+=calc(n,m)
        m*=5
    print(ans)

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

Solution (Python):
N = input()
ans = 0
if N[-1] in ['1','3','5','7','9']:
  ans = 0
else:
  N = int(N)
  while N >= 10:
    ans += N // 10
    N = N // 5
    
print(ans)

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

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

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

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

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

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

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

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

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

if n % 2 != 0:
    print(0) 
else:
    m = 10
    count = 0
    while m <= n:
        count += n // m
        m *= 5
    print(count)

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

Solution (Python):
n=int(input())
g=0
if n%2!=1:
 t=10
 while t<=n:
  g+=n//t
  t*=5
print(g)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def solve():
    n = II()
    if n & 1:
        print(0)
        return
    a5 = 5
    a2 = 0
    ans = 0
    a = n
    while n:
        a2 += n // 2
        n = n // 2
    while a:
        ans += a // 10
        a //= 5
    print(min(a2, ans))
    return



if __name__ == '__main__':
    solve()

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

Solution (Python):
import copy

n = int(input())
def calc(N):
    n_ = (N - N%10)//10
    c = 1
    s = copy.deepcopy(n_)
    while n_//(5**c) >= 1:
        c +=1
    c -= 1
    for i in range(1,c+1):
        s += n_//5**i
    return s

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

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

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

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

if N % 2 == 0:
  print(r(N//2, 5))
else:
  print(0)

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

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

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

def check_five(N):
    count = 0
    i = 5
    exp = 1
    while True:
        divided = N // i
        if divided == 0:
            break
        count += divided
        exp += 1
        i = 5 ** exp
    return count

if N % 2 == 0:
    ans = check_five(N//2)
else: 
    ans = 0

print(ans)

Solution (Python):



import sys

n = int(input())

if n % 2 == 1:
    print(0)
    sys.exit()
    
if n < 2:
    print(0)
    sys.exit()
    
l = list()

l.append(10)

l.append(50 )

l.append(250 )

l.append(1250 )

l.append(6250 )

l.append(31250 )

l.append(156250 )

l.append(781250 )

l.append(3906250 )

l.append(19531250 )

l.append(97656250 )

l.append(488281250 )

l.append(2441406250 )

l.append(12207031250 )

l.append(61035156250 )

l.append(305175781250 )

l.append(1525878906250 )

l.append(7629394531250 )

l.append(38146972656250 )

l.append(190734863281250 )

l.append(953674316406250 )

l.append(4768371582031250 )

l.append(23841857910156200 )

l.append(119209289550781000 )

l.append(596046447753906000 )

result = 0
for a in l:
    result += n // a
    
print(result)

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(1, 2*l):
        tmp = 0
        ans += (N // 10**i)
        tmp += (N // (10 * (5**i)))
        tmp -= N // (10 * (10**i))
        ans += max(tmp, 0)
 
    print(ans)

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

if n %2 ==1:
  print(0)
else:
  mod = 10
  ans = 0
  x = 0
  while True:
    x = n//mod
    if x==0: break
    ans+=x
    mod *= 5
  print(ans)

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

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

def check_five(N):
    count = 0
    i = 10
    while True:
        divided = N // i
        if divided == 0:
            break
        count += divided
        i = i * 5
    return count

if N % 2 == 0:
    ans = check_five(N)
else:
    ans = 0

print(ans)

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

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

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

count = 0
denom = 10

while denom <= N:
  count += N // denom
  denom = denom * 5

print(count)

Solution (Python):


from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


def main():
    n = ii()
    ans = 0
    if n%2:
        print(0)
    else:
        tmp = n//2
        while tmp > 0:
            ans+=tmp//5
            tmp//=5

        
        print(ans)

    
main()

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

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

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

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

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

ans = 0

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

print(ans)

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

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

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

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

    print(sum)

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

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

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

Solution (Python):
import sys

N = int(input())

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

cnt = 0
x = 10

while True:
    if x>N:
        break
    cnt += N//x
    x *= 5
print(cnt)

Solution (Python):
N=int(input())
c=N%10
if c%2==1:
  print("0")
else:
  i=1
  b=0
  while i<=100:
    b+=N//(2*(5**i))
    i+=1
  else:
    print(b)

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

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








s=0
t=10
while(N>=t):
    s+=(N//t)
    t*=5
print(s)

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

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

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

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

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

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

x = 1
num2 = 0
while x < N:
    x *= 2
    num2 += N//x

x = 1
num5 = 0
while x < N:
    x *= 5
    num5 += (N//x)//2

ans = min(num2, num5)
print(ans)

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

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


def solve(n, p):
    if n == 1 or n == 0:
        return 0
    return n//p + solve(n//p, p)

print(solve(n//2, 5))

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

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

Solution (Python):
N = int(input())  
if N%2==0: 
  r = 0 
  for i in range(99): 
    r += N // 10 // 5 ** i 
  print(r) 
else: 
  print(0)

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

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

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

if N % 2:
  print(0)
else:
  
  num_five = 0
  cursor = 10
  while N // cursor != 0:
    num_five += N // cursor
    cursor *= 5

  num_two = 0
  cursor = 2
  while N // cursor != 0:
    num_two += N // cursor
    cursor *= 2

  print(min(num_five, num_two))

Solution (Python):
import numpy as np
def calc(number):
    result = np.log10(number) - np.log10(number) % 1
    return(result)

input_num = int(input())

if(input_num % 2 == 1):
    print(0)
else:
    result_1 = 0
    num = 5
    while(input_num - num >= 0):
        result_1 += (input_num - num) // (num * 2) + 1
        num = num * 5
    num = 5
    result = 0
    while(input_num - num >= 0):
        result += input_num // num
        num = num * 5
    print(result - result_1)

Solution (Python):
def pcount(n,p):
    
    count = 0
    temp = p
    while temp <= n:
        count += n/temp
        temp *= p
    return count

n = int(raw_input())
if n%2 == 1:
  print 0
else:
  print pcount(n/2, 5)

Solution (Python):






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

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

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(input())
if n % 2 == 1:
	print(0)
else:
	n //= 2
	res = 0
	while n > 0:
		res += n // 5
		n //= 5
	print(res)

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

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

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

print(ans)

Solution (Python):









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

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

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

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

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

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

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

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

print(ans)

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

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

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

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

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

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

Solution (Python):
import math
n=int(input())
if n%2==1 or n<10:
    print(0)
else:
    n=n//2
    k=math.floor(math.log(n,5))
    c=0
    for i in range(1,k+1):
        c+=n//(5**i)
    print(c)

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

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

Solution (Python):
import sys

N = int(input())

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

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

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

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

p = 5
tmp = 0
o = n
n //= 2

while n > 1:
    tmp += n // p
    n = n // p

if o % 2 == 0:
    print(tmp)
else:
    print(0)