#include<bits/stdc++.h>
using namespace std;
double s[10000] = {2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309};
double a[10000] = {1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309};
int main()
{
int n;
cin >> n;
double ans = 0;
for(int i = 0; i < n; i++)
{
ans += s[i] / a[i];
}
printf("%.4lf", ans);
return 0;
}