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