#include <stdio.h>
int main()
{
int n, i;
double sum, a, b, t;
while (scanf("%d",&n)!=EOF) {
if (n == 0)
return 0;
a = 2.0, b = 1.0, sum = 0.0;
for (i = 1; i <= n; i++) {
sum += a/b;
t = b, b = a;
a = a + t;
}
printf("%.2lf\n", sum);
}
}
int main()
{
int n, i;
double sum, a, b, t;
while (scanf("%d",&n)!=EOF) {
if (n == 0)
return 0;
a = 2.0, b = 1.0, sum = 0.0;
for (i = 1; i <= n; i++) {
sum += a/b;
t = b, b = a;
a = a + t;
}
printf("%.2lf\n", sum);
}
}
好好学习,天天想上