fun main(args: Array<String>) = println(run {
    val n = readLine()!!.toInt()

    val l = LongArray(n+1)
    l[0] = 2
    l[1] = 1
    for (i in 2..n) {
        l[i] = l[i-1] + l[i-2]
    }
    l[n]

})
