import Control.Applicative
import Control.Monad
import Data.List
import Data.Array
import Data.Char

main = do
  n <- (read::String -> Integer) <$> getLine
  print . head $ calc (n - 1) [1, 2]

calc::Integer -> [Integer] -> [Integer]
calc n (x:y:rest)
  | n == 0 = x:y:rest
  | otherwise = calc (n - 1) ((x + y):x:y:rest)
