#include using namespace std; using ll = long long; using ld = long double; const ld euler_number = 0.577215664901532860606512090082; ld table[100]; void table_build(){ table[0] = 0; for (int i = 1; i < 100; i++){ table[i] = table[i-1] + ld(1)/ld(i); } } ld harmonic_number(ll n){ if (n < 100) return table[n]; ld ans = logl(n) + euler_number + ld(1)/ld(2*n) - ld(1)/ld(12*n*n); return ans; } int main(){ table_build(); ll n; cin >> n; ld ans = 0; ll d = 1; while (true){ ll c = n/d; if (c == 0) break; ll le = n/(c+1); ll ri = n/c; ans += harmonic_number(c) * (harmonic_number(ri) - harmonic_number(le)); d = ri+1; } cout << fixed << setprecision(20) << ans << endl; }