memo_luca :: Int -> Integer
memo_luca = (map luca [0..] !!)
    where
        luca :: Int -> Integer
        luca 0 = 2
        luca 1 = 1
        luca n = memo_luca (n - 1) + memo_luca (n - 2)

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