main :: IO ()
main = do
  s <- read <$> getLine
  let f n
        | n == 0 = [1]
        | n <= 2 = 0 : f (n - 1)
        | otherwise = let as = f (n - 1) in (as !! 0 + as !! 2) `mod` 1000000007 : as
  putStrLn $ show $ head $ f s
