fun main(args: Array<String>) {
    val N = nextInt()
    var ans: Double
    if (N % 2 == 0) ans = 0.5
    else ans = ((N + 1) / 2).toDouble() / N.toDouble()
    println(ans)

}
fun next() = readLine()!!
fun nextInt(delta: Int = 0) = Integer.parseInt(next()) + delta