//config = { input: 'tmp', newline: '\r\n' }; // win
config = { input: '/dev/stdin', newline: '\n' }; // linux

n = parseInt(require('fs').readFileSync(config.input, 'ascii'), 10);

fib = new Array(n + 1);
fib[0] = 1;
fib[1] = 1;
for (i = 2; i <= n; i++) fib[i] = fib[i-1] + fib[i-2];
console.log(fib[n]);