const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;

void (async function () {
    // Write your code here

    let dep = [];
    let num = await readline();
    let func = function func(num) {
        if (num == 1 || num == 2) {
            dep[num] = 1;
            return 1;
        }
        if (!dep[num]) {
            dep[num] = func(num - 2) + func(num - 1);
        }
        return dep[num];
    };
    func(num);

    console.log(dep[num]);
})();