import scala.io.StdIn

object Main extends App {

  val n = StdIn.readLine().toInt
  private val a: Array[Int] = Array.ofDim(45)
  a(0) = 1
  a(1) = 1
  
  def fib(k: Int): Int = {
    if(a(k) != 0){
      a(k)
    } else {
      a(k) = fib(k-1) + fib(k-2)
      a(k)
    }
  }

  println(fib(n))
}
