{-# LANGUAGE BangPatterns #-}
import Data.List
import Data.Maybe
import Data.Function (fix)
import Data.Array (Array, array, (!))
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BS8

modular :: Integer
modular = 1000000007
 
getInts :: IO [Int]
getInts = (map parseInt . BS8.words) <$> BS.getLine 
    where parseInt = fst . fromJust . BS8.readInt

solve :: Int -> Integer
solve n = go [2..n] `mod` modular

go :: [Int] -> Integer
go [] = 1
go (x:xs) = if x == 1 then go xs else (counts xs + 2) * go xs'
    where counts xs = foldl (\acc k -> acc + snd (f k)) 0 xs
          f k = if k `mod` x == 0 then let (a, r) = f (k `div` x) in (a, r+1) else (k, 0)
          xs' = map (fst . f) xs


main :: IO ()
main = do
    [n] <- getInts
    print $ solve n