import Data.List
import Control.Arrow
import qualified Data.IntMap as IM

main = readLn >>= print.solve

solve n = sum $ [solve244,solve2_24,solve4_14,solve74] <*> [filter(>1) $ IM.elems(facPfac n)]

solve244 xs = let   f = over 4 xs
                    t = over 2 xs in div (f * (f-1) * (f-2)) 2 + div (f * (f-1)) 2 * (t-f)
solve4_14 xs = (over 14 xs)*((over 4 xs)-1)
solve2_24 xs = (over 24 xs)*((over 2 xs)-1)
solve74 xs = over 74 xs

over n xs = length(filter(>=n)xs)

facPfac n = foldr1 (IM.unionWith (+)) $ map f100 [1..n]

f100 = IM.fromList.map(head&&&length).group.factorize p100
p100 = [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]

factorize pr@(p:ps) 1 = []
factorize pr@(p:ps) n = if n`rem`p==0 then p:(factorize pr (n`quot`p)) else factorize ps n
