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