fun main(args: Array<String>) {
  val N = readInt()
  val dp = Array(N + 1) { 0L }
  dp[0] = 2
  dp[1] = 1
  for (i in 2..N) {
    dp[i] = dp[i - 1] + dp[i - 2]
  }
  println(dp[N])
}

fun readString() = readLine()!!
fun readStrings() = readString().split(" ")
fun readInt() = readString().toInt()
fun readInts() = readStrings().map { it.toInt() }
