[<EntryPoint>]
let main argv =
    //printfn "Gokigenyou!"
    let n = System.Console.ReadLine() |> int
    let a =
        match n with
        | n when n % 2 = 1 -> n/2 + 1
        | _ -> n/2
    let ans = (float a) / (float n)

    System.Console.WriteLine(ans)
    0
