import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    if (n == 1) {
        println(1)
        return
    }
    var l0 = 2L
    var l1 = 1L
    var cur = -1L
    for (i in 2..n) {
        cur = l0 + l1
        l0 = l1
        l1 = cur
    }
    println(cur)
}