import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val n = sc.nextInt()
    if (n % 2 == 0) {
      println(0.5)
    } else {
      println((n / 2 + 1) * 1.0 / n)
    }
  }
}