import Data.List
import Data.Array.IArray
import Data.Array.IO
import Control.Applicative
import Control.Monad

ub = 1000

primes = 2 : f [3] [3,5..]
  where
    f (x:xs) ys = let (ps, qs) = span (< x^2) ys in ps ++ f (xs ++ ps) [z | z<-qs, mod z x /= 0]

primes' = takeWhile (< ub) $! primes

parray = accumArray (\x y -> y) False (1,ub) [(i, True) | i<-primes'] :: Array Int Bool


primeFactorize n = pfactorize' n primes'
  where
    pfactorize' _ [] = []
    pfactorize' 1 _ = []
    pfactorize' n pr@(p:ps) =
      if parray ! n then
        [n]
      else
        if mod n p == 0 then p : (pfactorize' (div n p) pr) else pfactorize' n ps

main = do
  n <- read <$> getLine

  let factors = foldl1 (++) $ map primeFactorize [1..n]
  
  arr <- newArray (1,n) 0 :: IO (IOArray Int Integer)

  forM_ factors $ \x -> do
    r <- readArray arr x
    writeArray arr x (r+1)


  print
    =<< return . (foldl1 (\x y -> mod (x*y) (10^9+7))) . (map (+1))
    =<< getElems arr

  
