main()
{
float qh(int);
float sum;
int n;
scanf("%d",&n);
sum=qh(n);
printf("%f",sum);
getch();
}
float qh(int n)
{
float a, b, c, d, e, f,sum=0;
int i;
a = 2;b = 1;
c = 3;d = 2;
sum = a / b + c / d;
e = a + c;
f = b + d;
for(i=2;i<n;i++)
{
sum = sum + e / f;
e = e + c;
f = f + d;
c = e;
d = f;
}
return sum;
}