
object Main extends App {
  
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val lucas: Stream[Long] = 2L #:: 1L #:: lucas.zip(lucas.tail).map(n => n._1 + n._2)
  println(lucas(n))
}