import scala.io.StdIn.readInt

object Main {
  def fib(a:Int, b: => Int, c:Int, n:Int):Int = {
    if (n ==  0)
      a
    else
      fib(a+b, a, b, n-1)
  }

  def main(args: Array[String]) = {
    val n = readInt()
    println(fib(1, 0, 0, n))
  }
}