import Control.Monad
import Control.Applicative
import Data.Functor
import Data.List
import Data.List.Split
import Data.Char
import Data.Ord
import Data.Array.IO

readInt = read :: String -> Int
getInt = readLn :: IO Int
getInts = map readInt . words <$> getLine
sjoin :: (Show a) => [a] -> String
sjoin = unwords . map show
cond :: a -> a -> Bool -> a
cond t f c = if c then t else f
-- end of templete

lucas n = lucas' (2,1) n :: Integer
  where
    lucas' (x,_) 0 = x
    lucas' (x,y) n = lucas' (y,x+y) (n-1)

main = getInt >>= print . lucas