function main(input) {
    var result = 0;
    if(input % 2 == 0) result = input / 2;
    else result = parseInt(input / 2) + 1;
    result = result / input;
    return result;
}

var input = require("fs").readFileSync("/dev/stdin", "utf8");
console.log(main(input));