import Control.Applicative
import qualified Data.Set as Set
import Data.Set ((\\))
import qualified Data.Maybe as Maybe

seive :: Integer -> Set.Set Integer -> Set.Set Integer
seive p xs
  | p*p > Set.findMax xs = xs
  | otherwise        = seive nextP (xs \\ mults)
    where mults = Set.fromAscList [p*p, (p+1)*p .. Set.findMax xs]
          nextP = Maybe.fromJust $ Set.lookupGT p xs

primes :: Integer -> [Integer]
primes m = Set.toList $ seive 2 $ Set.fromAscList [2..m]

solve n = f 1 $ map (\p -> iterate (* p) p) (primes 2000) where
   f y ((pps@(p:_)):ppss)
     | p <= n = f (y * (sum (map (div n) $ takeWhile (<= n) pps) + 1)) ppss
     | otherwise = y

main = do
  n <- read <$> getLine :: IO Integer
  print $ solve n `mod` 1000000007
