(() => {

    var lines = [];

    require('readline').createInterface({
        input: process.stdin,
    }).on('line', (line) => {
        lines.push(Number(line));
    });

    process.stdin.on("end", () => {
        console.log(fib(lines[0]));
    });

    const memoize = function(proc){
        const cache = {};

        const helper = (n) => {
            if(!cache[n]){
                cache[n] = proc(n);
            }
            return cache[n];
        }

        return helper;
    }

    const fib = memoize((n) => {
        if(n < 2){
            return 1;
        }
        return fib(n - 1) + fib(n - 2);
    });

})();
