fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let mut dp = vec![vec![0.; 7]; n+1]; dp[0][0] = 1.; for i in 0..n { for j in 0..=6 { if dp[i][j] == 0. { continue; } dp[i+1][j] += j as f64 / 6. * dp[i][j]; if j < 6 { dp[i+1][j+1] += (6 - j) as f64 / 6. * dp[i][j]; } } } println!("{}", dp[n][6]); }