#include #include #include #include using Int = boost::multiprecision::cpp_int; using Float = boost::multiprecision::cpp_dec_float_100; using Rational = boost::rational; void solve(int k){ Rational ans = 0; for(Int i = 1; i <= k; ++i){ ans += Rational(1, i); } ans *= Rational(1, k); std::cout << boost::rational_cast(ans) << std::endl; } int main(){ int k; std::cin >> k; std::cout << std::setprecision(100); if(k == 0) std::cout << boost::math::constants::zeta_two() << std::endl; else solve(k); }