#include #include using ll = long long; using ull = unsigned long long; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define REP(i, m, n) for(int i = (int)(m); i < (int)(n); i++) using namespace std; using namespace atcoder; using mint = modint998244353; const int inf = 1000000007; const ll longinf = 1ll << 60; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); ll n; cin >> n; vector sum(1000001); REP(i, 1, 1000001) { sum[i] = sum[i - 1] + 1.0 / i; } auto calc = [&](ll x) { if(x <= 1000000) return sum[x]; else return log((long double)x) + 0.5772156649015; }; long double ans = 0; REP(i, 1, 1000001) { if(i > n / i) { break; } ans += calc(i) * (calc(n / i) - calc(n / (i + 1))); // cout << i << " " << cnt << endl; } REP(i, 1, 1000001) { if(i >= n / i) { break; } ans += calc(n / i) / i; // cout << i << " " << endl; } cout << fixed << setprecision(15) << ans << endl; return 0; }