object Main{
  def fibnacchi(n : Int): Int = if(n == 1)
      return 1
    else if(n == 0)
      return 1
    else
      return fibnacchi(n-1) + fibnacchi(n-2)
  def main(args:Array[String]) = {
    val num = scala.io.StdIn.readLine.toInt;
    println(fibnacchi(num))
  }
}