fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: isize = n.trim().parse().unwrap(); let mut ans = 1.0; for i in 2..=n { if i == 2 { ans += 1.0 } else { let mut x = 0; for j in 1..i { for k in j + 1..i { x += j * k; } } ans += 2.0 / i as f64 + 2.0 * x as f64 / i as f64 / (i - 1) as f64; } } println!("{}", ans); }