// #pragma GCC optimize("O3,unroll-loops") #include // #include using namespace std; #if __cplusplus >= 202002L using namespace numbers; #endif int main(){ cin.tie(0)->sync_with_stdio(0); cin.exceptions(ios::badbit | ios::failbit); cout << fixed << setprecision(15); long long n; cin >> n; const int m = 1e6; vector h(m + 1); for(auto i = 1; i <= m; ++ i){ h[i] = h[i - 1] + 1.0L / i; } auto eval = [&](long long x)->long double{ return x <= m ? h[x] : logl(x) + egamma_v; }; long double res = 0; for(auto x = 1; x <= m; ++ x){ res += (2 * eval(n / x) - eval(min(m, n / x))) / x; } cout << res << "\n"; return 0; } /* */