main :: IO ()
main = do
  n <- readLn :: IO Integer
  let
    x = (n + 3) `div` 2
    y = (n + 2) `div` 2
    z = (x * y - 1) `mod` 1000007
  print z