main = do
  n <- readLn :: IO Integer
  putStrLn $ show $ h n

foldlState :: (c -> a -> b -> (c, a)) -> c -> a -> [b] -> a
foldlState f s a l = snd $ foldl (\(s,a) -> f s a) (s, a) l

h n | mod n 2 == 1 = 0
    | otherwise    = foldlState step 5 0 [2..30]
    where m = div n 2
          step k a _ = (k * 5, a + div m k)
