import Control.Applicative
import Control.Monad

main :: IO ()
main = do
    a <- readLn
    -- 出力
    putStrLn . show $ (lucas a)
    where
        lucas n = fst $ iterate (\(a, b) -> (b, a+b)) (2,1) !! n

