import java.util.Scanner

object Main {
  def getLucas(n: Int): Long = {
    val l: Long = if (n == 0) {
      2
    } else if (n == 1) {
      1
    } else {
      getLucas(n - 1) + getLucas(n - 2)
    }
    return l
  }

  def main(args: Array[String]): Unit = {
    println("input something...")
    val input = new Scanner(System.in)
    val n: Int = input.nextInt

    println(getLucas(n))
  }
}