{-# LANGUAGE BangPatterns #-}

import Control.Monad
import Data.List
import qualified Data.IntMap as M

pr = 2:3:1 # pr
m#(a:b:x)=[n|n<-[a^2..b^2-2],odd n,gcd n m<2]++(m*b)#(b:x)

fac _ m 1 = m
fac pa@(p:pr) m n
    | n`mod`p == 0 = fac pa (M.insertWith(+)p 1 m) (n`div`p)
    | True         = fac pr m n

main=do
    n<-readLn::IO Int
    print.foldl (\a n->(a*(n+1))`mod`1000000007) 1.M.elems $ foldl (fac pr) M.empty [2..n]
