function Main(input) {
    input = input.trim().split("\n").map(function(x) { return x.split(" ")});    
    var n = parseInt(input[0][0], 10);
    tmp1 = 1;
    tmp2 = 1; 
    ans = 1;
    for (var i = 2; i <= n; i++){
        ans = tmp1 + tmp2;
        tmp1 = tmp2;
        tmp2 = ans;
    }
    console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8")); 
