import qualified Data.Text.Lazy as T
import qualified Data.Text.Lazy.IO as T
import qualified Data.Text.Lazy.Read as T
import qualified Data.Vector.Unboxed as VU

main :: IO ()
main = do
  let
    modulus = 1000000007 :: Int
    f :: Int -> Int
    f 0 = 1
    f 1 = 0
    f s = go (s - 2) 1 0 0
    go :: Int -> Int -> Int -> Int -> Int
    go 0 _ _ c = c
    go k a b c = go (k - 1) b c ((a + c) `mod` modulus)
  s <- unsafeTextToInt <$> T.getLine :: IO Int
  print . f $ s

unsafeTextToInt :: T.Text -> Int
unsafeTextToInt s = case T.signed T.decimal s of
  Right (n, _) -> n
{-# INLINE unsafeTextToInt #-}
