import Debug.Trace

main :: IO ()
main = do
  n <- readLn :: IO Int
  print $ solve n

solve :: Int -> Int
solve n
  | n== 0 = 2
  | n== 1 = 1
  | otherwise = let (x, y) = f (n-1) in
--            trace (show (x, y)) $
            y * 2 + x
  where
    f i
      |i == 0 = (1, 0)
      |i == 1 = (1, 1)
      |otherwise = let (n1, n2) = f (i-1) in
                     (n1+n2, n1)
