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