#include #include using namespace std; typedef long long ll; typedef long double ld; ld h[1000010]; const ld eu = 0.5772156649; ld H(ll n){ if(n<=1000000) return h[n]; return log(n) + eu + (ld)1/(ld)2/(ld)n - (ld)1/(ld)12/(ld)n/(ld)n + (ld)1/(ld)120/(ld)n/(ld)n/(ld)n/(ld)n; } int main(){ cout.precision(20); for(int i=1;i<=1000000;i++){ h[i] = h[i - 1] + (ld)1/(ld)i; } ll n; cin >> n; ld ans = 0; for(ll l = 1;l<=n;){ ll r = n/(n/l); if(l>r) break; ans += (H(r) - H(l - 1))*H(n/l); l = r + 1; } cout << ans << "\n"; }