import Data.List (group, sort)

main = putStrLn. show . solve . read =<< getLine

-- |
-- >>> solve 9
-- 0
-- >>> solve 10
-- 1
-- >>> solve 100
-- 543


solve n =
    filter' 75 +
    filter' 25 * (filter' 3 - 1) +
    filter' 15 * (filter' 5 - 1) +
    filter' 5 * (filter' 5 - 1) * (filter' 3 - 2) `div` 2
      where
        filter' m = length . filter (>= (m - 1)) $ factorizeFactorial n

primes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97]

factorizeFactorial n = map length . group . sort . concatMap (factorize primes []) $ [2 .. n]

factorize ps@(p:ps') fs n
    | n == p         = p : fs
    | n `mod` p == 0 = factorize ps (p : fs) (n `div` p)
    | otherwise      = factorize ps' fs n
