import java.io.{BufferedReader, InputStreamReader}

object Main {
  def main(args: Array[String]): Unit = {
    val n = new BufferedReader(new InputStreamReader(System.in)).readLine().toInt
    System.out.println(
      if (n % 2 == 0) {
        1.0 * n / 2 / n
      } else {
        1.0 * (n / 2 + 1) / n
      }
    )
  }
}
