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):
from __future__ import print_function

import sys

import re
import array
import copy
import functools
import operator

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd



import collections
import itertools
import bisect

import random
import time

import heapq
from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace
from queue import PriorityQueue as pq
from queue import Queue

from itertools import accumulate

from collections import deque
from collections import Counter

from operator import mul
from functools import reduce

input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


def lcm(n, m):
    return int(n * m / gcd(n, m))


def coprimize(p, q):
    common = fractions.gcd(p, q)
    return (p // common, q // common)


def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


def find_gcd(list_l):
    x = reduce(gcd, list_l)
    return x


def main():
    n = int(input().strip())
    if n % 2 == 1:
        ans = 0
    else:
        ans = 0
        for i in range(1, 10**6):
            if 2*5**i > n:
                break
            ans += n//(2*5**i)

    print(ans)
    return


if __name__ == '__main__':
    main()

Solution (Python):
import math
from decimal import *
N=int(input())
insuuof10=0
cnt=0
if N%2==1:
    print("0")
else:
    for i in range(1,28,1):
        cnt=cnt+N//(2*pow(5,i))

    print(cnt)

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

    print(ans)

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())
ans = 0
g = 10

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

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

ans = 0

if n % 2 == 0:
    n //= 10
    for i in range(27):
        ans += n // 5 ** i

print(ans)

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

k = (N + 1) // 2
pow2, pow5 = k, 0

tmp = k
while tmp > 0:
    pow2 += (tmp // 2)
    tmp = (tmp // 2)

tmp = k
while tmp > 0:
    pow5 += (tmp // 5)
    tmp = (tmp // 5)


if N % 2 == 0:
    print(min(pow2, pow5))
else:
    pow2 = -pow2
    pow5 = -pow5
    k = 2 * k
    tmp = k
    while tmp > 0:
        pow2 += (tmp // 2)
        tmp = (tmp // 2)
    tmp = k
    while tmp > 0:
        pow5 += (tmp // 5)
        tmp = (tmp // 5)
    print(min(pow2, pow5))

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

Solution (Python):
N = input()

if int(N[-1])%2 == 1:
    print(0)
else:
    N = int(N)
    ans = N//10
    for i in range(2,1000):
        tmp = 2*5**i
        if tmp > N:
            break
        else:
            ans += N//tmp
    print(ans)

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

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

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

Solution (Python):
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
if N&1:
    print(0); exit()

def func(x):
    
    x //= 2
    ret = 0
    while x >= 5:
        ret += x // 5
        x //= 5
    return ret

answer = func(N)
print(answer)

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

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

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

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

Solution (Python):

import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [input() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [int(input()) for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def divisor(n):
        res = []
        i = 1
        for i in range(1, int(n ** 0.5) + 1):
            if n % i == 0:
                res.append(i)
                if i != n // i:
                    res.append(n // i)
        return res

    @staticmethod
    def round_up(a, b):
        return -(-a // b)

    @staticmethod
    def is_prime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True


def pop_count(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f


MOD = int(1e09) + 7
INF = int(1e15)


def main():
    
    N = Scanner.int()
    if N % 2 == 1:
        print(0)
    else:
        ans = 0
        while N > 0:
            ans += (N // 5) // 2
            N //= 5
        print(ans)


if __name__ == "__main__":
    main()

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

    score = 0
    b = 1
    while True:
        b *= 5
        if b > n:
            break
        score += n // b
    print(score)

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

Solution (Python):
N=int(input())
ans=0
if N%2==0:
    f=1
    while N>=2*5**f:
        ans+=N//(2*5**f)
        f+=1
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())

result = 0
if n % 2 != 1:
    fexp = 0
    for i in range(1, n):
        fexp = 5 ** i * 2
        if fexp > n:
            break
        result += n // fexp

print(result)

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

Solution (Python):
n=int(input())
cnt_10=0
MAX_10=0
if n%2==1:
    print(0)
else:
    for i in range(100):
        if 2*5**i<=n and n<2*5**(i+1):
            MAX_10=i
            break
    for j in range(1,MAX_10+1):
        cnt_10+=n//(2*5**j)  
    print(cnt_10)

Solution (Python):
n=int(input());a=m=n//10
while m:m//=5;a+=m
print(-~n%2*a)

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

ans = 0

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

print(ans)

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

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

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

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

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

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

Solution (Python):
import itertools
import sys
import math
import numpy as np
import fractions
from collections import deque
from itertools import combinations
from functools import reduce
from functools import lru_cache
from bisect import insort
sys.setrecursionlimit(10**9)

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

    ans = 0
    if N % 2 == 0:
        max = math.ceil(math.log(10**18/2,5))
        for i in range(1,max):
            ans += N // (pow(5,i) * 2)

    print(ans)


if __name__ == "__main__":
  main()

Solution (Python):
import math
def main():
	N = int(input())
	if N%2 == 1 or N==0:
		print(0)
	else:
		N = N//2
		P = int(math.log(N,5))
		ans = [ N//(5**p) for p in range(1,P+1)]
		print(sum(ans))

if __name__ == '__main__':
	main()

Solution (Python):
import sys

N=int(input())

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

ans1=0
ans2=0
a=2
b=5

while N//a!=0:
    ans1=ans1+N//a
    a=a*2
while N//b!=0:
    ans2=ans2+N//b//2
    b=b*5

print(min(ans1,ans2))

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

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

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

Solution (Python):
import math
import time
from collections import deque
from copy import deepcopy

t = time.time()
def iip():
    ret = [int(i) for i in input().split()]
    if len(ret) == 1:
        return ret[0]
    return ret


def main():
    n = iip()

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

    ret = int(0)

    num = 10
    while num <= n:
        ret += n // num
        num *= 5

    print(int(ret))


main()

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

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

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

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

Solution (Python):
def fun(n):
    if n%2!=0:
        return 0
    else:
        ans=0
        n//=2
        while(n):
            ans=ans+n//5
            n=n//5
    return ans


n = int(input())
if n>=2:
    print(fun(n))
else:
    print(0)

Solution (Python):
p=int(input())
n=p
if n%2 == 0:
    num=10
    c=0;
    while num <= n:
        c += (n//num)
        num *= 5
    print(c)
else:
    print(0)

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

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

Solution (Python):
import sys
import math
n = int(sys.stdin.readline().strip())
if n % 2 != 0:
    print(0)
    sys.exit(0)
down = 10
accum = 0
while True:
    crt = n // down
    if crt < 1:
        break
    accum += crt
    down *= 5
print(accum)

Solution (Python):
N = input()
if len(N) <= 1:
  print(0)
  exit()
if int(N[-1]) %2 == 0:
    ans = int(N[:-1])
    N = int(N[:-1])
    k = 1
    while k != 0:
        k = N // 5
        N = k
        ans += k
    print(ans)
else:
    print(0)

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

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

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

Solution (Python):
from collections import defaultdict, deque
import sys, heapq, bisect, math, itertools, string, queue, copy, time
from fractions import gcd
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7
EPS = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())


n = int(input())
digi = len(str(n))
ans = 0
if not bool(n&1):
    for i in range(1,50):
        ans += n//(5**i)//2

print(ans)

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


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



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

    print(ans)

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

if N % 2 == 0:
    count = 10
    amount_5 = 0
    while count <= N:
        amount_5 += N // count
        count = count * 5
else:
    amount_5 = 0

print(amount_5)

Solution (Python):






import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9 +7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


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

    if arr==[]:
        arr.append([n, 1])
    return arr


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





N = inputI()

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

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

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

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

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

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

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

ans = 0

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

print(int(ans))

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

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

Solution (Python):
def fx(X, n):
    if (X//n):
      
      return fx(X//n, n)+X//n
    return 0

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

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


def solve():
  n = int(input())
  s = str(n)
  if n%2 == 1:
    print(0)
  else:
    ans = 0
    n //= 2
    for i in range(1,35):
      tmp = 5**i
      ans += n//tmp
    
       
    print(ans)

solve()

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

print(cnt)

Solution (Python):
N=int(input())
if N%2==1:
    print(0)
else:
    numbers=[]
    number=10
    while number<=pow(10,18):
        numbers.append(number)
        number*=5
    answer=0
    for a in numbers:
        answer+=N//a
    print(answer)

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

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

Solution (Python):

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

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

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

Solution (Python):



N = int(input())

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

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

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

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

print(ans)

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

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

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

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

    print(total)

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

if N<10 or N%2==1:
  print(0)
else:
  N//=10
  answer=0
  while(N>0):
    answer+=math.floor(N)
    N//=5

  print(answer)

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

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

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

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

print(ans)

Solution (Python):
import math

n = int(input())

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

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

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

print(ans)

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

Solution (Python):
import math

N = int(input())
if N%2 == 1 or N<10:
  print(0)
  exit()
five = N//10
for i in range(int(math.log(N//10,5))):
  five += N//(10*5**(i+1))
print(five)

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


def func(x):
    return len(str(x))


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

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

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


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

print(ans)

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

if n % 2 == 0:
    n = n // 2
    fives = 5
    while 1:

        if fives > n: 
            break
        ans += n // fives
        fives *= 5

print(ans)

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

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

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

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

print(cnt_5)

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

Solution (Python):
import math
import copy
from copy import deepcopy
import sys
import fractions

from functools import reduce

import heapq
import collections
import itertools
sys.setrecursionlimit(100001)






def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList






n = int(input())






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

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

ans = 0
keta = 10
for i in range(30):
    ans += n//keta
    keta *= 5

    if keta > n:
        break

print(ans)

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

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

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

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

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

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

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

print(ans)

Solution (Python):
N = int(input())
if N % 2 == 1:
    print(0)
else:
    N_copy = N
    N_copy //= 2
    count_5 = 0
    count_2 = 0
    while N_copy > 0:
        N_copy //= 5
        count_5 += N_copy
    while N > 0:
        N //= 2
        count_2 += N
    print(min(count_2, count_5))

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

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

    n = int(input())

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



if __name__ == "__main__":
    main()

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


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

while N % 10 != 0:
    N -= 1

ans = 0

x = 1

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

print(ans)

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())
count = 0
a = n//2
b = 5

if n % 2 != 0:
    print(count)
else:
    while True:
        count += a//b
        if a//b == 0:
            break
        b *= 5

    print(count)

Solution (Python):
import math
n = int(input())
if n % 2 != 0 or n == 0:
    print(0)
    exit()
l = math.ceil(math.log(n, 5))

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

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

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

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

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

Solution (Python):
n=int(input());print(sum(n//(10*(5**i))for i in range(99))*(n%2==0))

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

for i in range(50):
    if n >= 10*(5**(i)):
        ans += n//(10*(5**(i)))
print(ans)

Solution (Python):
n=int(input());print(sum(n//(10*(5**i)) for i in range(99))*(n%2==0))

Solution (Python):
n=int(input())
ans=0
if n%2==0:
  n//=2
  while(n>0):
    n//=5
    ans+=n
 
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 sys
input = sys.stdin.readline

def main():
    N = int(input())
    
    if N&1:
        print(0)
    else:
        num = 10
        ans = 0
        tmp = N // num
        while tmp > 0:
            ans += tmp
            num *= 5
            tmp = N // num
        print(ans)

if __name__ == "__main__":
    main()

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

Solution (Python):
def main():

    n = int(input())

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

    while n>4:
        ans += n // 5
        n = n // 5

    print(ans)


if __name__ == '__main__':
    main()

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

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

    print(ans)



if __name__ == "__main__":
    main()

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

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

ans = 0
div = 10

while N >= div:
    ans += N // div
    div *= 5

print(ans)

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

Solution (Python):
N = int(input())
ans = 0
if N%2 == 0:
    N //= 2
    for i in range(40):
        ans += N//5
        N = N//5

print(ans)

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

counter = 0

N_temp = N
while N_temp//5 != 0:
	N_temp = N_temp//5
	counter += 1

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

Solution (Python):





import sys
from collections import deque

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    n = int(input())
    ans = 0

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

    print(ans)


if __name__ == '__main__':
    main()

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

def solve(n):
    res = 0
    if n % 2 == 1:
        return 0
    
    t = 10
    while t <= n:
        res += n // t
        t *= 5
    
    return res

print(solve(n))

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

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

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

def main():
    n=int(input())
    cnt=5
    ans=0
    if n%2==0:
        n=n//2
        while cnt<=n:
            ans+=n//cnt
            cnt*=5
    print(ans)                
    
if __name__ == '__main__':
    main()

Solution (Python):



def main():
    n = int(input())
    ans = 0

    if n % 2 == 1:
        print(ans)
    else:
        division = 10

        while division <= n:
            ans += n // division

            division *= 5

        print(ans)


if __name__ == '__main__':
    main()

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

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


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

print(ans)

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


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

"""
def f(n):
    if n>=2:
        answer=n
        n-=2
    while n>=2:
        answer*=n
        n-=2
    return answer
print(f(N))
"""

Solution (Python):
from math import factorial

N = int(input())

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

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

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

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

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

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

ans = 0

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

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

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

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

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

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

Solution (Python):

n=int(input())


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

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


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



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

Solution (Python):
def f(x):
	if(x==0):
		return 0
	else:
		return x//10+f(x//5)
x = int(input())
if x%2 == 1:
	print(0)
else:
	print(f(x))

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

count = 0
i = 1
while True:
    temp = 2 * (5 ** i)
    count += n // temp
    if temp > n:
        break
    else:
        i += 1

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

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

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

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