
fun main(args:Array<String>) {
    val lucas = mutableListOf(2L,1L)
    val n = readLine()!!.toInt()
    (2..n).forEach { lucas.add(lucas[lucas.lastIndex-1] + lucas.last()) }
    println(lucas.last())
}
