import scala.io.StdIn

object Main extends App {

  val n = StdIn.readLine.toInt

  val ans = {
    var dp = Array.ofDim[Long](n+1)
    dp(0) = 2L
    dp(1) = 1L
    for(i <- 2 to n){
      dp(i) = dp(i-1) + dp(i-2)
    }
    dp(n)
  }

  println(ans)
}