import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  n <- readLn :: IO Int
  print $last $take (n+1) $ unfoldr (\(n0,n1) -> Just (n0, (n1, n0+n1))) (2, 1)