#include <stdio.h>
#include <math.h>
float fun(int n){
if(n == 0) return 0;
int x = 2,y = 1;
float res = 0;
while(n > 0){
res += (float)x/y;
int temp = x;
x = x + y;
y = temp;
n --;
}
return res;
}
int main()
{
int i,n;
scanf("%d", &n);
printf("%f",fun(n));
return 0;
}