"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0]);
    
    let odd  = 0;
    let even = 0;
    
    for(let i=1; i<=N; i++) {
        if(i % 2 === 0) {
            even++;
        } else {
            odd++;
        }
    }
    
    console.log(N % 2 === 0 ? even / N : odd / N);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));