fn read() -> i32 { let mut s = String::new(); std::io::stdin().read_line(&mut s).unwrap(); s.trim().parse().unwrap() } fn main() { let n = read(); let m = 100000; let mut ans = 0f64; let mut sum = 0f64; for b in 2..m { sum += 1f64 / (b - 1) as f64; ans -= sum * (1f64 / b as f64).powi(n + 1); } let mut sum = 0f64; for a in 1..m { sum += 1f64 / a as f64; ans += sum * (1f64 / a as f64).powi(n + 1); } println!("{:.7}", ans); }