#include <bits/stdc++.h>
using namespace std;
double max(double a, double b) {
  if (a > b)
    return a;
  else
    return b;
}
int main() {
  int n;
  cin >> n;
  double ans[n + 1];
  for (int i = 2; i <= n; i++) {
    ans[i] = 0;
  }
  ans[1] = 1;
  for (int i = 2; i <= n; i++) {
    double max1 = 0;
    for (int j = 0; j < 2; j++) {
      max1 = max(max1, (double)j / (double)i + ans[i - j]);
    }
    ans[i] = max1;
  }
  cout << ans[n] << endl;
  return 0;
}
