import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    s <- getInt
    let f 1 a _ _ = a
        f n a b c = f (n-1) b c ((a+c) `mod` 1000000007)
    print $ f s 0 0 1
