fun main(args : Array<String>) {
    val n = readLine()!!.toInt()
    if (n == 1) {
        println(1)
    } else if (n % 2 == 0) {
        println(0.5)
    } else {
        val double = n.toDouble()
        val result: Double = ((double + 1) / 2) / double
        println(result)
    }
}