'use strict'

function main(input) {
    input = Number(input)

    let ans = 0
    let numbers = [2, 1]
    for (let i = 2; i <= input; i++) {
        let tmp = numbers[i - 2] + numbers[i - 1]
        // console.log(i, tmp)
        numbers.push(tmp)

    }

    console.log(numbers.pop())
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))