import scala.io.StdIn.readInt

object Main {

  def main(args:Array[String]) = {
    def loop(i:Int, x:Int, y:Int):Int = if(i == 0) y else loop(i-1, y, x+y)
    val n = readInt
    println(loop(n,0,1))
  }
}
