-- Declarative Programming (exercise of week 7)
-- 17.30

fibonacci :: [Integer]
fibonacci = out
    where 
      out = 1 : 1 : zipWith (+) out (tail out)

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