#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int n;
cin >> n;
double s = 0;
int j = 1;
for (int i = 1; i <= n; i++)
{
s += j * 1.0 / i;
j *= -1;
}
cout << fixed << setprecision(4) << s;
return 0;
}