import scala.io.StdIn.readInt

object Main {

  def main(args:Array[String]) = {
    val n = readInt
    var a = 1;var b = 0
    for(i<-0 until n) {
      val c = a
      a = a+b
      b = c
    }
    println(a)
  }
}