var parseint = x => x.split('\n').map(parseFloat);
function main(input){
  input = parseint.call(null,input)[0];
  console.log(Math.ceil(input/2)/input);
}
main(require('fs').readFileSync('/dev/stdin','utf8'));