#include using namespace std; const double mathgamma = 0.5772156649015328606065120; const long long mx = 1000000; double H_table[mx + 1]; double H(long long n){ if (n < 0) return 0; if (n <= mx) return H_table[n]; return log(n) + mathgamma + (double)1 / (double)2 / (double)n - (double)1 / (double)12 / (double)n / (double)n; } int main(){ for (int i=1; i<=mx; i++){ H_table[i] = H_table[i-1] + (double)1 / i; } long long n; cin >> n; double ans = 0; long long i = n; while (i > 0){ long long v = n / i; long long j = n / (v + 1); ans += H(v) * (H(i) - H(j)); i = j; } cout << fixed << setprecision(15); cout << ans << '\n'; }