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