import Control.Monad
import Data.List

main :: IO ()
main = readLn >>= print . solve

solve :: Int -> Int 
solve n = foldl' ff 1 $ takeWhile (<= n) primes
    where
        ff acc x = modf $ acc * count x
        modf = (`mod` 1000000007)
        count p = check 1 [2..n]
            where
                check acc (x : xs) 
                    | x `mod` p == 0 = check (acc + 1) (x `div` p : xs)
                    | otherwise = check acc xs
                check acc _ = acc 

primes :: [Int]
primes = calc [2..]
    where
        calc (x : xs) = x : calc (filter (\n -> n `mod` x /= 0) xs)