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

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