function Main(input){
    var N = parseInt(input,10);
    var n = N % 2;
    var k = (N + 1)/ 2;

    if(n = 0){
        console.log(1 / 2);
    }else{
        console.log(k / N);
    }

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