factor5 :: Integer -> Integer
factor5 0 = 0
factor5 1 = 0
factor5 2 = 0
factor5 3 = 0
factor5 4 = 0
factor5 n = (n `div` (5 :: Integer)) + factor5 (n `div` (5 :: Integer))

solve :: Integer -> Integer
solve n
    | nMod2 == 1  = 0
    | otherwise = factor5 nOver2
    where nOver2 = n `div` 2
          nMod2  = n `mod` 2

main = do
    n <- read <$> getLine
    let ans = solve n
    print ans
