import qualified Data.Map as Map

ptn = [[(74,1)], [(2,1),(24,1)], [(4,1),(15,1)], [(2,1),(4,2)]] -- [[(e,c)]] : factor ^ e, c is num of e  

scan :: Int -> Int
scan n = iter ptn where
    iter [] = 0
    iter (p:ps) = iter1 [] (combsIn p) + iter ps
    iter1 _ [] = 1
    iter1 used (g:gs) = sum (map comb g) where
        comb c  | c == [] = 0
                | any (\x -> elem x used) c = 0
                | otherwise = iter1 (c++used) gs
    combsIn = map (\(e, c) -> combinations (Map.keys (Map.filter (>= e) (factorial n))) c)

combinations :: [a] -> Int -> [[a]]
combinations l r = comb (length l) r l where
    comb _ 0 _ = [[]]
    comb 0 _ _ = []
    comb n r al@(x:xs) 
        | n == r = [al]
        | otherwise = map (x:) (comb (n-1) (r-1) xs) ++ comb (n-1) r xs

factorial:: Int -> Map.Map Int Int
factorial = iter Map.empty where
    iter m 0 = m
    iter m n = iter (Map.unionWith (+) m (factors n)) (n-1)

factors :: Int -> Map.Map Int Int
factors = iter Map.empty divisors where
    iter m (d:ds) n
        | n == 1    = m
        | n >= d*d  = case logP d n of
            Just (e, n') -> iter (Map.insert d e m) ds n'
            Nothing      -> iter m ds n          
        | otherwise = Map.insert n 1 m 

logP :: Int -> Int -> Maybe (Int, Int)
logP p n = if mod n p == 0 then iter 0 n else Nothing where
        iter e x = case divMod x p of
            (1, 0) -> Just (e+1, 1)
            (q, 0) -> iter (e+1) q
            (_, _) -> Just (e, x)

divisors :: [Int]
divisors = 2:3:(iter [5,11..] [7,13..]) where
    iter (x:xs) (y:ys) = x:y:(iter xs ys)

main :: IO() 
main = do
    n  <- readLn :: IO Int
    let ans = scan n
    print ans