import Control.Monad
import Data.IntMap as M
import Data.List as L

primes :: [Int]
primes = takeWhile (<31623) $ 2:3:p
    where 
        p = 5:q 1 7 p
        q m s (p:ps) = [n|n<-[x+y|x<-[s,s+6..p*p-2],y<-[0,4]],gcd m (toInteger n)<2]++q (m*toInteger p) (p*p) ps

fac :: [Int]->M.IntMap Int->Int->M.IntMap Int
fac _ m 1 = m
fac [] m n = M.insert n 1 m
fac pa@(p:pr) m n
    |mod n p==0=fac pa (M.insertWith(+) p 1 m) (div n p)
    |otherwise =fac pr m n

main=do
    k <- readLn::IO Int
    let ps = M.elems $ L.foldl' (\m n -> fac primes m n) M.empty [1..k]
    let us = length $ L.filter (>=74) ps
    let vs = length $ L.filter (>=24) ps
    let ws = length $ L.filter (>=14) ps
    let fs = length $ L.filter (>=4) ps
    let ss = length $ L.filter (>=2) ps
    print $ us + (vs*(ss-1)) + (ws*(fs-1)) + (fs*(fs-1)*(ss-2)`div`2)
