import Foundation
 
let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ")
 
var N = Double(split[0])!

if (Int(N)%2==0){
    print(0.5)
}else{
    print((N+1)/(2*N))
}
