function main(input) {
   input = input.trim();
  const a = input.split(" ").map(Number);

  console.log(a[0] % 2 ==1 ?Math.floor(a[0]/2+1)/a[0] : 0.5);
  
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));