object Main {
  def main(args: Array[String]): Unit = {
    import java.util.Scanner
    val in = new Scanner(System.in)
    val n = in.nextInt
    val odd = n / 2 + (if (n % 2 != 0) 1 else 0)
    val answer = odd / n.toDouble
    println(answer)
  }
}