{-
fibonacci :: Int -> Int
fibonacci = fibo (1, 1) 2
    where
      fibo :: (Int, Int) -> Int -> Int -> Int
      fibo (pp, prev) pos n
          | n < 2 = 1
          | pos >= n = pp + prev
          | otherwise = fibo (prev, pp+prev) (pos+1) n
-}

fibonacci :: Int -> Integer
fibonacci = (map fibo [0 ..] !!)
    where
      fibo n
          | n < 2 = 1
          |otherwise = fibonacci (n-2) + fibonacci (n-1)

main :: IO ()
main = do
  n <- readLn
  putStrLn $ show $ fibonacci n