import Control.Monad (forM_)
import qualified Data.Vector.Mutable as MV

main :: IO ()
main = do
    n    <- readLn   :: IO Int
    if n == 0 || n == 1 then
        print 1
    else do
        memo <- MV.replicate (n + 1) 1 :: IO (MV.IOVector Integer)
        forM_ [2..n] $ \i -> do
            a <- MV.read memo (i - 2)
            b <- MV.read memo (i - 1)
            MV.write memo i (a + b)
        MV.read memo n >>= print
