import java.io.BufferedReader
import java.io.InputStreamReader

fun main(args: Array<String>) {
    val br = BufferedReader(InputStreamReader(System.`in`))
    val n = br.readLine().toInt()
    var i0 = 2L
    var i1 = 1L
    for (i in 2..n) {
        val i2 = ryuka(i0, i1)
        i0 = i1
        i1 = i2
    }
    println(i1)
}

fun ryuka(i1: Long, i2: Long): Long = i1 + i2