use std::io::*; use std::str::FromStr; fn get_primes(max_prime: i64) -> Vec { let mut ret = Vec::new(); let mut isprime = vec![true; (max_prime + 1) as usize]; isprime[0] = false; isprime[1] = false; for i in 2..(max_prime + 1) as usize { if isprime[i] { ret.push(i as i64); for j in i * 2..(max_prime + 1) as usize { isprime[j] = false; } } } ret } fn zeta(n: i64) -> f64 { let primes = get_primes(1000000); let mut ret = 1.0; for i in 0..primes.len() { let p = primes[i] as f64; let x = 1.0 / (1.0 - p.powf(-n as f64)); ret *= x; } ret } fn main() { let mut s = String::new(); stdin().read_line(&mut s).ok(); let s = s.trim(); let n = i64::from_str(s).unwrap(); println!("{:.14}", zeta(n)); }