import Data.List
 
f n k c
  | n == 1 = c : []
  | q == 0 = f q k (c + 1)
  | otherwise = (c + 1) : f n (k + 1) 0
  where q = n `mod` k
 
g = foldr (zipWith (+)) [0..]

(%*%) x y = (x * y) `mod` 1000000007
 
main = do
  n <- readLn
  print . h $ g [ f n' 2 0 | n' <- [1..n] ]

h [] = 1
h (x:xs) = (x + 1) %*% h xs
 