fun main(args: Array<String>) {
    abc079b()
}

fun abc079b() {
    val n = readLine()!!.toInt()

    val lucas = mutableListOf(2L, 1L)
    (2..n).map {
        lucas.add(lucas[it - 2] + lucas[it - 1])
    }

    println(lucas[n])
}
