const line = require('fs').readFileSync('/dev/stdin', 'utf-8').split('\n');

const fib = n => {
    const memo = [];
    const helper = x => {
        if (x <= 1) return 1;
        if (memo[x] !== undefined) return memo[x];
        memo[x] = helper(x-1) + helper(x-2);
        return memo[x];
    }

    return helper(n);
};

console.log(fib(parseInt(line[0])));

