function main (input) {
  var num = Number(input);
  var numofodd = parseInt(num/2);
  if(num % 2 !== 0) numofodd ++;
  console.log(numofodd/num);

}

main(require("fs").readFileSync("/dev/stdin", "utf8"));