import java.util.*

val sc = Scanner(System.`in`)
val N = sc.nextInt()
val L = arrayOf(2L, 1L)

fun main(args: Array<String>) {
    for (i in 2..N) {
        L[i % 2] = L.sum()
    }
    println(L[N % 2])
}
