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-----
12

-----Sample Output-----
1

f(12) = 12 × 10 × 8 × 6 × 4 × 2 = 46080, which has one trailing zero.

Difficulty: MEDIUM

Solutions:
n = int(input())
if n % 2 == 1:
	print(0)
	exit()
A = 0
add = 10
while n >= add:
	A += n // add
	add *= 5
print(A)


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


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


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


n = int(input())
if n <= 4:
	print(0)
	return
if n % 2 == 1:
	print(0)
	return
cnt = 10
ans = 0
for i in range(100):
	ans += n // cnt
	cnt *= 5
print(ans)


N = int(input())
c = 0
if N % 2 != 0:
	pass
else:
	for i in range(26):
		d = 5 ** (i + 1) * 2
		c += N // d
print(c)


import sys
input = sys.stdin.readline

def main():
	N = int(input())
	if N % 2 == 1:
		print(0)
		return
	count = []
	i = 0
	while True:
		q = N // (10 * 5 ** i)
		if q == 0:
			break
		else:
			count.append((q, i + 1))
			i += 1
	ans = 0
	prev_c = 0
	for (c, n_zero) in count[::-1]:
		ans += n_zero * (c - prev_c)
		prev_c = c
	print(ans)

def __starting_point():
	main()
__starting_point()


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


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


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


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


n = int(input())
sum = 0
if n % 2 == 0:
	a = n
	while a > 0:
		a = a // 5
		sum += a // 2
print(sum)


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


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


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


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


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


N = int(input())
if N % 2 or N < 10:
	print(0)
	return
ans = 0
i = 1
while 2 * 5 ** i <= N:
	ans += N // (2 * 5 ** i)
	i += 1
print(ans)


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


import sys
n = int(input())
d = 10
a = 0
if n % 2 != 0:
	print(0)
	sys.exit()
while n >= d:
	a += n // d
	d *= 5
print(a)


n = int(input())
if n < 10 or n % 2:
	print(0)
else:
	t = 0
	for i in range(1, 30):
		t += n // (2 * 5 ** i)
	print(t)


N = int(input())

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


N = int(input())
if N % 2 == 1:
	print(0)
	return
n = 10
ans = 0
while True:
	if n > N:
		break
	ans += N // n
	n *= 5
print(ans)


import sys
n = int(input())
if n % 2 == 1:
	print(0)
	return
ans = 0
cnt = 1
while 5 ** cnt * 2 <= n:
	ans += n // (5 ** cnt * 2)
	cnt += 1
print(ans)


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


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


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	if n % 2 == 1 or n < 10:
		return 0
	st = 10
	ans = []
	while st <= n:
		ans.append(n // st)
		st *= 5
	return sum(ans)
print(main())


def main():
	N = int(input())
	if N % 2 != 0:
		print(0)
		return
	ans = 0
	i = 1
	while 2 * 5 ** i <= N:
		ans += N // (2 * 5 ** i)
		i += 1
	print(ans)
main()


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)


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


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


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


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


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


def resolve():
	N = int(input())
	if N % 2 == 1:
		return print(0)
	ans = 0
	tmp = N // 2
	while tmp:
		tmp //= 5
		ans += tmp
	print(ans)

def __starting_point():
	resolve()
__starting_point()


N = int(input())
a = 10
b = 0
if N & 1 == 0:
	while a <= N:
		b += N // a
		a *= 5
print(b)


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


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


n = int(input())
r = 0
if n % 2 == 0:
	n //= 2
	while n:
		n //= 5
		r += n
print(r)


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


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


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


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)


n = int(input())
if n % 2:
	print(0)
else:
	n //= 2
	a = 0
	while 0 < n:
		n //= 5
		a += n
	print(a)


N = int(input())
if N % 2 == 0:
	answer = 0
	N //= 2
	for i in range(100):
		answer += N // 5
		N //= 5
	print(answer)
else:
	print('0')


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


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


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


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


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


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


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


n = int(input())
if n % 2 == 1:
	print(0)
	return
ans = 0
ex = 1
while True:
	expo = 2 * 5 ** ex
	if n // expo == 0:
		break
	ans += n // expo
	ex += 1
print(ans)


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


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


N = int(input())
n = N // 10
cnt = 0
if N % 2 == 0:
	while n != 0:
		cnt += n
		n //= 5
print(cnt)


n = int(input())
if n % 2 == 1:
	print(0)
	return
fcnt = 0
tmp = 5
while n >= tmp:
	fcnt += n // 2 // tmp
	tmp *= 5
print(fcnt)


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


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


import math
N = int(input())
if N % 2 == 1:
	print(0)
	return
ans = 0
i = 1
while 1:
	a = 2 * 5 ** i
	if N // a == 0:
		break
	ans += N // a
	i += 1
print(ans)


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)


n = int(input())
c = 0
i = 1
tmp = n // 2
while tmp != 0:
	tmp = tmp // 5
	c = c + tmp
if n % 2 == 0:
	print(int(c))
else:
	print(int(0))


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


n = int(input())
if n % 2 == 1:
	print(0)
	return
mp = tmp = 0
while True:
	if 5 ** tmp > n:
		break
	mp = tmp
	tmp += 1
ans = 0
for i in range(1, mp + 1):
	ans += n // (2 * 5 ** i)
print(ans)


N = int(input())
if N % 2 == 0:
	Ans = 0
	p = 1
	check = 0
	while check != 0 or p == 1:
		check = N // (2 * 5 ** p)
		Ans += check
		p += 1
	print(Ans)
else:
	print(0)


n = int(input())
if n % 2 == 1:
	print(0)
	return
ans = 0
cnt = 0
ones = 0
keta = []
cnt = 5 * 2
while n >= cnt:
	ans += n // cnt
	cnt *= 5
print(ans)


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


n = int(input())
p = 10
su = 0
while p <= n:
	su += n // p
	p *= 5
if n % 2 == 1:
	print(0)
else:
	print(su)


n = int(input())
ans = 0
d = 5
for i in range(36):
	ans += n // d // 2
	d *= 5
print(0 if n % 2 else ans)


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


import sys
N = int(input())
if N % 2 == 1:
	print(0)
	return
tot = 0
i = 10
while N >= i:
	tot += N // i
	i *= 5
print(tot)


n = int(input())
m = n // 10
f = []
while m:
	f.append(m % 5)
	m //= 5
print(0 if n % 2 else sum((a * (5 ** (i + 1) // 4) for (i, a) in enumerate(f))))


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


n = int(input())
fives = [0]
if n % 2 == 1:
	print(0)
else:
	i = 0
	while 1:
		temp5 = n // 5 ** (i + 1) // 2
		if temp5 != 0:
			fives.append(temp5)
			i += 1
		else:
			break
	print(sum(fives))


n = int(input())
nsave = n
n //= 2
ret = 0
while n > 0:
	n //= 5
	ret += n
print(ret if nsave % 2 == 0 else 0)


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


n = int(input())
if n % 2 == 1:
	print(0)
	return
n //= 2
t = 1
count = -1
while n >= t:
	t *= 5
	count += 1
ans = 0
for i in range(1, count + 1):
	ans += n // 5 ** i
print(ans)


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


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


from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float('inf')
(YES, Yes, yes, NO, No, no) = ('YES', 'Yes', 'yes', 'NO', 'No', 'no')
(dy4, dx4) = ([0, 1, 0, -1], [1, 0, -1, 0])
(dy8, dx8) = ([0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1])

def inside(y, x, H, W):
	return 0 <= y < H and 0 <= x < W

def ceil(a, b):
	return (a + b - 1) // b

def sum_of_arithmetic_progression(s, d, n):
	return n * (2 * s + (n - 1) * d) // 2

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

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

def solve(n):
	if n % 2 != 0:
		return 0
	total = 0
	now = 5
	while now <= n:
		total += n // (now * 2)
		now *= 5
	return total

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

def __starting_point():
	main()
__starting_point()


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


n = int(input())
if n % 2 != 0:
	print(0)
	return
ketasu = len(str(n))
ans = 0
for i in range(1, 100):
	ans += n // (2 * 5 ** i)
print(ans)


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


N = int(input())
if N % 2 == 1:
	print(0)
else:
	a = 0
	i = 0
	while 5 ** i * 2 <= N:
		i += 1
		b = 5 ** i * 2
		a += N // b
	print(a)


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


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


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)


def func(n):
	if n % 2 == 1:
		return 0
	res = 0
	n //= 2
	while n:
		res += n // 5
		n //= 5
	return res
n = int(input())
print(func(n))


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


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


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


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)


n = input()
m = len(n)
n = int(n)
if n % 2 == 1:
	print(0)
elif m == 1:
	print(0)
else:
	ans = 0
	i = 1
	while True:
		ans_plus = n // (2 * 5 ** i)
		if ans_plus == 0:
			break
		ans += ans_plus
		i += 1
	print(ans)


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


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

def __starting_point():
	N = int(input())
	solve(N)
__starting_point()


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


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


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


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


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


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


N = int(input())
bo = 10
ans = 0
if N % 2 == 0:
	while bo <= N:
		ans += N // bo
		bo *= 5
print(ans)


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


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


N = int(input())
if N % 2 == 1:
	print(0)
else:
	a = N // 2
	S = 0
	while a != 0:
		a //= 5
		S += a
	print(S)


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


import math
from decimal import *

def cnt_prime(p, n):
	div = Decimal(str(n))
	s = 0
	while True:
		div /= p
		if div < 1:
			break
		if p == 2:
			s += int(div.quantize(Decimal('0.0'), rounding=ROUND_FLOOR))
		else:
			s += int(div.quantize(Decimal('0.0'), rounding=ROUND_FLOOR)) // 2
	return s
N = int(input())
if N % 2 == 1:
	print(0)
else:
	print(min(cnt_prime(2, N), cnt_prime(5, N)))


N = int(input())
if N % 2 == 1:
	print(0)
else:
	N //= 2
	print(sum((N // pow(5, j) for j in range(1, 30))))


def solve(N: int):
	if N % 2 == 0:
		N = N // 2
		answer = 0
		div = 5
		while N >= div:
			answer += N // div
			div *= 5
		return answer
	else:
		return 0
	return answer

def main():
	N = int(input())
	answer = solve(N)
	print(answer)

def __starting_point():
	main()
__starting_point()


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


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


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


n = int(input())
ans = 0
tmp = 0
p = 1
if n % 2 == 0:
	k = n // 2
	while True:
		tmp = k // pow(5, p)
		ans += tmp
		p += 1
		if tmp == 0:
			break
print(ans)


n = int(input())
if n % 2 == 1:
	print(0)
else:
	print(sum((n // (2 * 5 ** d) for d in range(1, 25 + 1))))


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


N = int(input())
ans = 0
m = 10
if N & 1:
	print(0)
	exit()
while N >= m:
	ans += N // m
	m *= 5
print(ans)


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


import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque, Counter
from decimal import Decimal
import functools

def v():
	return input()

def k():
	return int(input())

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

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

def X():
	return list(input())

def L():
	return list(input().split())

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

def lcm(a, b):
	return a * b // math.gcd(a, b)
sys.setrecursionlimit(10 ** 6)
mod = 10 ** 9 + 7
cnt = 0
ans = 0
inf = float('inf')
al = 'abcdefghijklmnopqrstuvwxyz'
AL = al.upper()
n = k()
if n % 2 == 1:
	print(0)
else:
	for i in range(1, n):
		if n >= 2 * 5 ** i:
			cnt += n // (2 * 5 ** i)
		else:
			break
	print(cnt)


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


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)


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


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


x = int(input())
s = 0
if x % 2 == 0:
	p = 10
	while p <= x:
		s += x // p
		p *= 5
print(s)


import sys
MOD = 10 ** 9 + 7
INF = 10 ** 9
PI = 3.141592653589793

def read_str():
	return sys.stdin.readline().strip()

def read_int():
	return int(sys.stdin.readline().strip())

def read_ints():
	return map(int, sys.stdin.readline().strip().split())

def read_ints2(x):
	return map(lambda num: int(num) - x, sys.stdin.readline().strip().split())

def read_str_list():
	return list(sys.stdin.readline().strip().split())

def read_int_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def GCD(a: int, b: int) -> int:
	return b if a % b == 0 else GCD(b, a % b)

def LCM(a: int, b: int) -> int:
	return a * b // GCD(a, b)

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

def Main():
	n = read_int()
	if n % 2:
		print(0)
		return
	ans = 0
	n //= 2
	while n >= 5:
		n //= 5
		ans += n
	print(ans)

def __starting_point():
	Main()
__starting_point()


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


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


N = int(input())
n = 0
if not N % 2:
	s = 5
	N = N // 2
	while N >= s:
		n += N // s
		s *= 5
print(n)


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


n = int(input())
if n % 2 == 1:
	print('0')
else:
	five = 0
	two = 0
	for i in range(1, n):
		f = n // (2 * 5 ** i)
		t = n // 2 ** i
		if f == t == 0:
			break
		five += f
		two += t
	print(min(five, two))