use std::io::*; fn rand() -> u32 { static mut X: u32 = 123456789; static mut Y: u32 = 362436069; static mut Z: u32 = 521288629; static mut W: u32 = 88675123; unsafe { let t = X ^ (X << 11); X = Y; Y = Z; Z = W; W = (W ^ (W >> 19)) ^ (t ^ (t >> 8)); W } } fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let k: u32 = itr.next().unwrap().parse().unwrap(); let mut ans = 0.0; for _ in 0..100000 { let mut now = 0u32; while now != k { now += rand() % 6 + 1; if now > k { now = 0; } ans += 1.0; } } println!("{:.10}", ans / 100000.0); }