'use strict'
function Main(input) {
    let num = input.trim();
  	let ans = 1;
    if( num % 2 ){
    	ans = Math.ceil(num/2)/num;
    }else {
        ans = 1/2;
    }
  	console.log(ans);
}


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