fun main(args:Array<String>){
  var n = readLine()!!.toInt()
  var a:Long = 2
  var b:Long = 1
  var c:Long = 0
  if(n==0){
    println(a)
  }else if(n==1){
    println(b)
  }else{
    for(i in 2..n){
      c = a+b
      a = b
      b = c
    }
    println(c)
  }
}
