function Main(input) {
    var data = input.split("\n")
	var num = parseInt(data[0]);
 	if(num==1){
    	console.log(1)
    }else if(num%2==0){
    	console.log(0.5)
    }else{
     	console.log((num+1)/2/num);
    }
}
 
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));