import Control.Applicative
import Control.Monad
import qualified Data.ByteString.Char8 as B
import Data.Array
import Data.Array.ST
import Data.Maybe (fromJust)
import qualified Data.Map as M
import Text.Printf
import Debug.Trace

sieve n = runSTArray $ do
  isp <- newListArray (0,n) (False:False:repeat True)
  forM_ (takeWhile (\x->x*x <= n) [2..]) $ \i -> do
    ok <- readArray isp i
    when ok $ do
      forM_ [i*2,i*3..n] $ \j -> do
        writeArray isp j False
  return isp
plist n = foldr (\(i,e) acc -> if e then i:acc else acc) [] $ assocs $ sieve n

adjustDefault f k z m = if k `M.member` m
                        then M.adjust f k m
                        else M.insert k z m

factor 1 _ m = m
factor x (p:ps) m
  | x `mod` p == 0 = factor (x `div` p) (p:ps) (adjustDefault (+1) p 1 m)
  | otherwise = factor x ps m

pm :: Integer
pm = 1000000007

main = do
  [n] <- getInts
  let ps = plist n
  let m = M.unionsWith (+) [factor i ps (M.empty) | i <- [2..n]]
  print $ M.foldl (\x y -> x*(y+1) `mod` pm) 1 m

-- util
getInts :: IO [Integer]
getInts = map (fst . fromJust . B.readInteger) . B.words <$> B.getLine

substr :: Int -> Int -> B.ByteString -> B.ByteString
substr b l s = B.take l $ B.drop b s
