import Control.Monad 

main :: IO ()
main = readLn >>= print . solve 
    where
        solve n = xs !! n
            where
                xs = 2 : 1 : calc xs

        calc (x : y : zs) = (x + y) : calc (y : zs)
