import qualified Data.Array as A
import Data.Array ((!))

main :: IO ()
main = print . (lucas !) . read =<< getLine
    
lucas :: A.Array Int Int
lucas = A.array (0, 86) [(i, lucaNum i)|i<-[0..86]]
    where 
    lucaNum 0 = 2
    lucaNum 1 = 1
    lucaNum n = lucas!(n-1) + lucas!(n-2)