import Control.Monad
import Control.Applicative

main :: IO ()
main = do
  n <- (read <$> getLine) :: IO Int
  print $ lucas n 2 1

lucas :: Int -> Int -> Int -> Int
lucas 0 a _ = a
lucas n a b = lucas (n - 1) b (a + b)