#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1e16;
double dp[111111];
int par[111111];
int main(void) {
  int n;
  scanf("%d", &n);
  dp[0] = 0;
  dp[1] = 1;
  dp[2] = 1.5;
  for (int e = 3; e <= n; e++) {
    for (int p = 1; p >= 1; p--) {
      double val = (double)p / (double)e;
      if (dp[e] < dp[e - p] + val) {
        dp[e] = dp[e - p] + val;
        par[e] = e - p;
      }
    }
  }
  printf("%.9lf", dp[n]);
  return 0;
}
