import qualified Data.Map as MP
import Data.Maybe
import Data.List

primeFactor :: MP.Map Int Int -> Int -> MP.Map Int Int
primeFactor m n = loop n 2 m
    where
        loop :: Int -> Int -> MP.Map Int Int ->  MP.Map Int Int
        loop n i m
            | n `rem` i == 0 = inner n i m
            | i * i > n = if n /= 1 
                then search n m
                else m 
            | otherwise = loop n (i+1) m
        
        inner ::  Int -> Int -> MP.Map Int Int -> MP.Map Int Int
        inner n i m
            | n `rem` i == 0 = let m' = search i m in inner (n `quot` i) i m'
            | otherwise = loop n (i+1) m
        
        search :: Int -> MP.Map Int Int -> MP.Map Int Int 
        search k m = case MP.lookup k m of
            Just _ -> MP.adjust (+1) k m
            Nothing -> MP.insert k 1 m

solve :: Int -> Int
solve n = loop m
    where
        m = foldl' primeFactor MP.empty [2..n] 
        mulMod a b = (a * b) `rem` (10^9+7)
        loop :: MP.Map Int Int -> Int
        loop m 
            | MP.null m = 1
            | otherwise =
                let 
                    ((_, v), m') = MP.deleteFindMin m
                in
                    mulMod (v+1) $ loop m'

main = do
    n <- readLn :: IO Int
    print $ if n == 1 then 1 else solve n
