"use strict"

const arg_str = require('fs').readFileSync('/dev/stdin', 'UTF-8')
const N = parseInt(arg_str)

if(N == 1){
    console.log(1)
}else if(N % 2 == 1){
    const M = N + 1
    const L = M /2
    console.log(L/N)
}else{
    console.log(0.5)
}
