const main = input => {
    const N = parseInt(input);
    const oddNum = Math.ceil(N / 2);
    console.log(oddNum / N);
};

// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"));
// main(require("fs").readFileSync("input.txt", "utf8"));