[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reada f = stdin.ReadLine().Split() |> Array.map f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

[<EntryPoint>]
let main _ =
    let n = read int
    if n % 2 = 0 then
        float (n / 2) / float n
    else
        float (n / 2 + 1) / float n
    |> printfn "%.7f"

    0