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() } } fn zeta(n: i32) -> f64 { let mut res = 0.0; for i in 2..500_000 { res += (1.0 / i as f64).powi(n); } res } fn solve(writer: &mut io::BufWriter) { let x = read!(i32); let mut ans = 0.0; for i in x..50 { ans += zeta(i); } ans *= 1_000_000.0; writeln!(writer, "{}", ans.floor() as i64).ok(); } fn main() { let stdout = io::stdout(); let mut writer = io::BufWriter::new(stdout.lock()); solve(&mut writer); }