function Main(input) {
    var n = parseInt(input, 10);
    var l = [2, 1];
    for(i = 2; i <= n; i++){
        var luca = l[i-2] + l[i-1];
        l.push(luca);
    }
var ll = l.map(n => parseInt(n));
    console.log(l[n]);
}
 
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));