use std::io::{self, Write}; use std::{fmt, ops, str}; macro_rules! read { ( $t:ty ) => {{ let mut input = String::new(); io::stdin().read_line(&mut input).unwrap(); input.trim_end().parse::<$t>().ok().unwrap() }}; ( $( $t:ty ),* ) => {{ let mut input = String::new(); io::stdin().read_line(&mut input).unwrap(); let mut iter = input.split_whitespace(); ( $( iter.next().unwrap().parse::<$t>().unwrap() ),* ) }}; } struct IoStr(Vec); impl str::FromStr for IoStr { type Err = (); fn from_str(s: &str) -> Result { Ok(IoStr(s.chars().collect())) } } impl fmt::Display for IoStr { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", self.0.iter().collect::()) } } #[derive(Clone)] struct IoVec(Vec); impl str::FromStr for IoVec { type Err = T::Err; fn from_str(s: &str) -> Result { let iter = s.split_whitespace(); Ok(IoVec(iter.map(|x| x.parse()).collect::>()?)) } } impl fmt::Display for IoVec { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", self.0.iter().map(|x| x.to_string()) .collect::>().join(" ") ) } } impl ops::Index for IoVec { type Output = T; fn index(&self, i: usize) -> &Self::Output { self.0.get(i - 1).unwrap() } } impl ops::IndexMut for IoVec { fn index_mut(&mut self, i: usize) -> &mut Self::Output { self.0.get_mut(i - 1).unwrap() } } const EPS: f64 = 1e-16; fn solve(writer: &mut io::BufWriter) { let k = read!(f64); let mut ans = 0.0; for n in (1..).map(|n| n as f64) { let a = 1.0 / (n * (n + k)); if a < EPS { break; } ans += a; } writeln!(writer, "{:.10}", ans).ok(); } fn main() { let stdout = io::stdout(); let mut writer = io::BufWriter::new(stdout.lock()); solve(&mut writer); }