import Control.Arrow
import Control.Monad
import Data.List
import qualified Data.ByteString.Char8 as B

main :: IO ()
main = readLn >>= print . solve

solve :: Int -> Int
solve n = (c5 * (c5 - 1) * (c3 - 2) `div` 2) + c25 * (c3 - 1) + c15 * (c5 - 1) + c75
    where
        es = map length . group . sort $ generate n 
        [c3, c5, c15, c25, c75] = map count [3, 5, 15, 25, 75]

        generate 1 = [1]
        generate n = gen n ps
            where
                gen 1 _ = generate $ n - 1 
                gen c (p : xs) 
                    | m == 0 = p : gen r (p : xs)
                    | otherwise = gen c xs 
                    where
                        (r, m) = c `divMod` p 
                        
        count c = length $ filter (>= (c - 1)) es

        ps = takeWhile (< 100) $ primes


readLine :: IO [Int]
readLine = unfoldr (fmap (second (maybe B.empty snd . B.uncons)) . B.readInt) <$> B.getLine

readContents :: Int -> IO [[Int]]
readContents = flip replicateM readLine

primes :: [Int]
primes = build [2..]
    where
        build (x : xs) = x : build (filter (\n -> n `mod` x /= 0) xs)