Problem:
 Score : 500 points    Problem Statement For an integer n not less than 0 , let us define f(n) as follows:   f(n) = 1 (if n < 2 )  f(n) = n f(n-2) (if n \geq 2 )   Given is an integer N . Find the number of trailing zeros in the decimal notation of f(N) .      Constraints  0 \leq N \leq 10^{18}         Input Input is given from Standard Input in the following format:  N       Output Print the number of trailing zeros in the decimal notation of f(N) .        Sample Input 1 12      Sample Output 1 1  f(12) = 12 × 10 × 8 × 6 × 4 × 2 = 46080 , which has one trailing zero.       Sample Input 2 5      Sample Output 2 0  f(5) = 5 × 3 × 1 = 15 , which has no trailing zeros.       Sample Input 3 1000000000000000000      Sample Output 3 124999999999999995

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

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

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

print(ans)

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

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

print(ans)

Solution (Python):
import sys; readline = sys.stdin.readline
from collections import deque


N = int(readline())


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

def count(d, n):
    c = 0
    a = n
    while True:
        a = a // d
        if a == 0:
            break
        c += a
    return c

print(min(count(2,N), count(5, N // 2)))

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

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

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

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

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

  print(ans)

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

d = 5

if n%2:
    print(0)
else:
    ans = 0
    while n//(2*d):
        ans += n//(2*d)
        d = d*5
    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):
def main():

    N = int(input())

    
    
    
    

    if N % 2 == 1:
        return 0
    else:
        tens = []
        p = 5
        while p <= N:
            tens.append(p)
            p *= 5

        ans = 0
        for p in tens:
            ans += N // (2*p)
        return ans


if __name__ == '__main__':
    print(main())

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

    ret = 0
    for p in range(1, 30 + 1):
        ret += N // (2 * pow(5, p))
    return ret


if __name__ == '__main__':
    print(main())

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

Solution (Python):


N = int(input())

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

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

Solution (Python):

N=int(input())



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

Solution (Python):






from sys import stdin,setrecursionlimit









from fractions import gcd
setrecursionlimit(10**6)
input=stdin.readline

n=int(input())
if n%2==1:
    print(0)
else:
    div2,div5=0,0
    a=n//2
    while a>1:
        div2+=a//2
        a//=2
    a=n//2
    while a>1:
        div5+=a//5
        a//=5
    print(min(div2,div5))

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


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

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

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

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

B = N


count = N // 10


a = 50
while B >= a:
    count += B // a
    a *= 5

print (count)

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

print(ans)

Solution (Python):
def legendre(n):

	ans1=0
	tp=2
	while(n//tp>0):
		ans1+=n//tp
		tp=tp*2

	ans2=0
	fp=5
	while(n//fp>0):
		ans2+=(n//fp)//2
		fp=fp*5

	if(N%2==0):
		
		ans=min(ans1,ans2)
	else:
		ans=0

	return ans

N=int(input())

print(legendre(N))

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

Solution (Python):
words = lambda t : list(map(t, input().split()))
n = int(input())

xs = []
for i in range(30):
    xs.append((n // (5**i)) // 2)


if n % 2 == 0:
    print(sum(xs[1:]))
else:
    print(0)

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

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

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

Solution (Python):
n = int(input())
buf = [0 for i in range(30)]
how = 0
if n%2 == 1:
    how = 0
else:
    how = 0
    n = n//2
    base = 1
    for i in range(30):
        base = base*5
        ar =n//base
        buf[i] = ar
    for i in range(30):
        how += buf[i]

print(how)

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

ans = 0

k = 1

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

    print(ans)
else:
    print(0)

Solution (Python):
import math

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

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

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

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

ans = 0
ans += N//10

i = 50
while i <= N:
    ans += N//i
    
    
    i *= 5


print(ans)

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

Solution (Python):

import sys
import math
import collections


n=int(input())

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

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

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

Sum = 0

if N % 2 != 0:
    print("0")
else:
    x = 10

    while N >= x:
        Sum += N // x
        x *= 5

    print(Sum)

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

print(ans)

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

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

Solution (Python):
import sys

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

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

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



def solve(a,st) :
    if st > a :
        return 0
    return a//st + solve(a,5 * st);


if a % 2 == 1 :
    print(0)
else :

    st = 10
    print(solve(a,st))

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

Solution (Python):
from sys import exit

N = int(input())

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

result = 0
t = 10
while t <= N:
  result += N // t
  t *= 5
print(result)

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

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

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

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

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

n //= 2

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

print(ans)

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

Solution (Python):
import math

n = int(input())


def sub(n):
	max_v = int(math.log(n // 2, 5))
	ans = 0
	for i in range(max_v):
		ans += n // (2 * 5 ** (i + 1))
	return ans

def guess(n):
	if n % 2 == 1 or n < 10:
		return 0
	else:
		return sub(n)

print(guess(n))

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

Solution (Python):
l = [
 5,
 25,
 125,
 625,
 3125,
 15625,
 78125,
 390625,
 1953125,
 9765625,
 48828125,
 244140625,
 1220703125,
 6103515625,
 30517578125,
 152587890625,
 762939453125,
 3814697265625,
 19073486328125,
 95367431640625,
 476837158203125,
 2384185791015625,
 11920928955078125,
 59604644775390625,
 298023223876953125,
 1490116119384765625,
 7450580596923828125]
a = int(input())
res = 0
for i in l:
    res+= (a//i)//2
if a%2==1 or a<10:
    print(0)
else:
    print(res)

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

divs = [5**i for i in range(1, 31)]
if N % 2 == 1:
    print(0)
else:
    ans = 0
    for div in divs:
        ans += N // div // 2
    print(ans)

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

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

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

    print(cnt)

Solution (Python):
import sys
from collections import defaultdict
from copy import deepcopy
import itertools
input = sys.stdin.readline




def log(k, b):
    a = 0
    while b ** a <= k:
        a += 1
    return a - 1



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

Solution (Python):
from sys import stdout
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True 
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

n = inn()
if n%2 == 1:
    print(0)
    exit()
m = n//2
x = 0
for i in range(1,30):
    x += m//(5**i)
print(x)

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

Solution (Python):
import math
import random
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
N = int(input())
ans = 0
if N%2 == 1:
    print(0)
else:
    N //= 2
    while N >= 5:
        ans += N//5
        N = N //5
    print(ans)

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

Solution (Python):
def main():
    N = int(input())
    if N % 2 != 0:
        print(0)
        return
    i = 1
    f2 = 0
    while (2 ** i) <= N:
        f2 += (N // (2 ** i))
        i += 1
    i = 1
    f5 = 0
    while (5 ** i) * 2 <= N:
        f5 += (N // ((5 ** i) * 2))
        i += 1
    print(min(f2, f5))


main()

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

Solution (Python):
n=int(input())
if n%2==1 or n==0 or n==1:
  print(0)
else:
  l=n//2
  k=0
  while l>=5:
    l/=5
    k+=1
  c=0
  for i in range(1,k+1):
    c+=n//(2*5**i)
  print(c)

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

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

num = n // 2
dv = 5
ans = 0
while dv <= 10 ** 18:
    ans += num // dv
    dv *= 5

print(ans)

Solution (Python):

import sys
input = sys.stdin.readline

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

print(ret)

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

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


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

print(retval)

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

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

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

Solution (Python):
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def GI(V,E,Directed=False,index=0):
    org_inp=[]
    g=[[] for i in range(n)]
    for i in range(E):
        inp=LI()
        org_inp.append(inp)
        if index==0:
            inp[0]-=1
            inp[1]-=1
        if len(inp)==2:
            a,b=inp
            g[a].append(b)
            if not Directed:
                g[b].append(a)
        elif len(inp)==3:
            a,b,c=inp
            aa=(inp[0],inp[2])
            bb=(inp[1],inp[2])
            g[a].append(bb)
            if not Directed:
                g[b].append(aa)
    return g,org_inp
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase
ts=time.time()

input=lambda: sys.stdin.readline().rstrip()

def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

show_flg=False
show_flg=True


ans=0

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

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


def g(n,k):
    
    '''
    k=-1
    for i in range(30):
        if 5**i<=n:
            k=i
    '''
    return n//(5**(k))-n//(5**(k+1))

n=n//2

for i in range(1,30):
    
    ans+=g(n,i)*i

print(ans)

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

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

if N % 2 == 1:
  print(0)
else:
  fives = 0
  twos = 0
  f = 10
  while (N // f != 0):
    fives += N // f
    f = f * 5
  t = 2
  while (N // t != 0):
    twos += N // t
    t = t * 2
  print(min(fives, twos))

Solution (Python):
n = int(input())
if n%2:
  print(0)
else:
  t = n//2
  c2, c5 = t, 0
  l = t
  while t>0:
    t //= 2
    c2 += t
  while l>0:
    l //= 5
    c5 += l
  print(min(c2, c5))

Solution (Python):

import sys
input = sys.stdin.readline

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

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

Solution (Python):


N = int(input())

ans = 0

if N % 2:
    ans = 0
else:
    n = N // 10

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

print(ans)

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

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

for i in range(1, 100):
    two += N//2**i

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

print(min(two, five))

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

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

ans = N // 10
for i in range(2,30):
    m = 10**i//2**(i-1)
    ans += N // m 
print(ans)

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

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

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

ans = 0

if n != 0 and n % 2 == 0:
    m = n //2
    while (m > 0):
        m = m // 5
        ans += m

print(ans)

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

if n % 2 == 1:
    out = 0
else:
    n2 = n // 2
    tmp5 = 5
    out = 0
    while tmp5 <= n2:
        out += (n2 // tmp5)
        tmp5 *= 5

print(out)

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

Solution (Python):

import sys
input = sys.stdin.buffer.readline


from collections import defaultdict
from fractions import gcd

def getlist():
	return list(map(int, input().split()))


def main():
	N = int(input())
	if N % 2 == 0:
		D = defaultdict(int)
		n = int(N // 2)
		D[2] += n
		for i in range(1, 42):
			D[2] += int(n // (2 ** i))
		for i in range(1, 42):
			D[5] += int(n // (5 ** i))
		print(min(D[2], D[5]))

	else:
		print(0)

if __name__ == '__main__':
	main()

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

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
from operator import mul
import bisect
import sys
import logging
import heapq
import itertools

logging.basicConfig(level=logging.ERROR)

input = sys.stdin.readline

setrecursionlimit(1000000)


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

def factorization(n):
	if n<2:
		return []
	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 cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(numbers):
	return reduce(fractions.gcd, numbers)

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

class PriorityQueue():
	def __init__(self):
		self.queue = []
	def push(self,i):
		heapq.heappush(self.queue,-i)
	def pop(self):
		return -1 * heapq.heappop(self.queue)
	def sum(self):
		return -sum(self.queue)

main()

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

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

Solution (Python):
import sys
from fractions import *

stdin = sys.stdin

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

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

Solution (Python):

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


n = int(input())

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

div = 1
n //= 2

for i in range(33):
    div *= 5
    cnt += n // div

print(cnt)

Solution (Python):
def inpl():
    return list(map(int, input().split()))


def solve(N, m=5):
    tmp = (N // m) // 2
    if tmp > 0:
        t = solve(N, m * 5)
        return tmp + t
    else:
        return 0


N = int(input())

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

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    if N&1:
        print(0)
        return
    ans = 0
    for ex in range(1,26):
        ans += (N//(5**ex))//2
    print(ans)
if __name__ == '__main__':
    main()

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

ans = 0
if n % 2 == 1:
    print(0)
    import sys
    sys.exit()
else:
    while n:
        ans += n // 10
        n //= 5

print(ans)

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

if N % 2 == 1:
  print(0)
else:
  a = 0
  '''for i in range(1, 19):
    a += N // (10**i)'''
  j = 1
  b = 1
  while b > 0:
    b = N // ((5 ** j) * 2)
    j += 1
    a += b
  print(a)

Solution (Python):
import os
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


N = int(sys.stdin.buffer.readline())


def test():
    ret = 1
    for i in range(2, N + 1, 2):
        ret *= i
    r = 0
    while ret % 10 == 0:
        ret //= 10
        r += 1
    print(r)


def count(c):
    
    return N // c


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

ans = 0
c = 10
while c <= N:
    ans += count(c)
    c *= 5
print(ans)

Solution (Python):
import sys, fractions
def input():
    return sys.stdin.readline()[:-1]
N = int(input())

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

ans = 0
for i in range(1,30):
    k = (5**i)*2
    if k>N:
        break
    ans += N//k
print(ans)

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

if N % 2 == 0 :
  ret = 0
  x = 10
  for _ in range(1, 40) :
    ret += N // x
    x *= 5
    
  print(ret)
else :
  print(0)

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

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

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


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


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    if N % 2 == 1:
        return 0

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


def main():
    N = read_int()
    print(slv(N))


if __name__ == '__main__':
    main()

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

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

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

ans=0
if(n<=2 or n%2==1):
    ans=0
else:
    temp=n//10
    ans+=temp
    for i in range(100):
        temp//=5
        ans+=temp
        if(temp==0):
            break


print(ans)

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

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

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

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

    print(ans)

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

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

count = 0
m = 10
while True:
    count += N // m
    m *= 5
    if N // m == 0:
        break

print(count)

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

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

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

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

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

Solution (Python):
import queue
import math
import copy
"""
N = int(input())



A = []
for i in range(N):
	A.append(int(input()))

print(A)

"""

N = int(input())

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

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

Solution (Python):
import sys
import math

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    n=int(input())
    if n%2:
        print(0)
        exit()
    ans=0
    d=10
    for _ in range(26):
        ans+=n//d
        d*=5
    print(ans)

main()

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

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

l = []
for i in range(30, 0, -1):
    l.append(2 * (5**i))

here = 0
for i in range(1, len(l)):
    here += (n//l[i] - n//l[i-1]) * (len(l) - i)

print(here)

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

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

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

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

Solution (Python):
import math

def make_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 bitlist(x,digit):
    res = [0 for i in range(digit)]
    now = x
    for i in range(digit):
        res[i]=now%2
        now = now >> 1
    return res



m = int(input())
n = m//2
flag2 = m%2

num2=0
num5=0
ans2=1
ans5=1

while(True):
    if(ans2 > n):
       break
    num2 += 1
    ans2 *= 2
    
while(True):
    if(ans5 > n):
       break
    num5 += 1
    ans5 *= 5   

have2 = 0
have5 = 0

now2 = num2
for i in range(num2):
    times = n // int(2**now2)
    have2 += times
    now2 -=1
    

now5 = num5
for i in range(num5):
    times = n // int(5**now5)
    have5 += times
    now5 -=1
    


if(flag2==0):
    print(min(have2+n,have5))
else:
    print(0)

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

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

ans = 0
d = 2 * 5
for i in range(40):
    ans += N // d
    d *= 5
print(ans)

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
if n%2==1:
    print(0)
    quit()
tmp=n
waru=10
li=[]
while tmp//waru>0:
    li.append(tmp//waru)
    waru*=5
ans=0


print(sum(li))