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 line = Number(await readline());
    let dep = [1, 2, 4];
    if (line <3) {
        console.log(dep[line - 1]);
    } else {
        for (let i = 3; i < line; i++) {
            dep[i] = dep[i - 1] * 2;
        }
        console.log(dep[line - 1]);
    }
})();