from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
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 = inp()
 
if N%2 == 1:
    print(0)
else:
    ans = 0
    div = 10
    while div <= N:
        ans += N//div
        div *= 5
    print(ans)