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