import java.util.*

class LucasIterator {
    var L0: Long = 2
    var L1: Long = 1
    var count = 0

    operator fun hasNext(): Boolean = true
    operator fun next() : Long {
        if (count==0) {
            count++
            return L0
        } else if (count==1) {
            count++
            return L1
        }
        val tmp = L1
        L1 = L1 + L0
        L0 = tmp
        count++
        return L1
    }
}

fun main(args: Array<String>) {
    val cin = Scanner(System.`in`)
    val N = cin.nextInt()

    val iter = LucasIterator()
    var ans: Long = 0
    for (i in 1..N+1) {
        ans = iter.next()
    }
    println(ans)
}