func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func main() {
    let n = Int(readLine()!)!
    
    if n % 2 == 0 {
        print("0.5")
    } else {
        print(Double(n / 2 + 1) / Double(n))
    }
}

main()
