(() => {
    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);
    });

    let input = require('fs').readFileSync('/dev/stdin', 'utf8').split("\n");
    console.log(fib(Number(input[0])));
})();
