import Data.List

main :: IO ()
main = interact $ solve

solve :: String -> String
solve = show . lucas . read

lucas :: Int -> Integer
lucas x = (!! x) . map fst $ iterate step (2, 1)
  where
    step (x, y) = (y, x + y)
