import java.util.*

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    val a = scanner.nextInt()

    if (a % 2 == 0) {
        println(0.5)
        return
    }

    val i = a / 2
    println((i + 1).toDouble() / a)
}