#include <stdio.h>
//f(n)=1+1/1+1/2+1/3+...+1/n
int main(){
int n,i;
double sum=0.0;
scanf("%d",&n);
for (i=1;i<=n;i++){
sum+=1.0/i;
}
printf("f(%d)=%f
",n,sum);
return 0;
}
//f(n)=1-1/2+1/3-1/4+...+1/n
int main(){
int n,i;
double sum=0.0;
int sign=1;//double sign=1.0;
scanf("%d",&n);
for (i=1;i<=n;i++){
sum+=sign*1.0/i;//sum+=sign/i;
sign=-sign;
}
printf("f(%d)=%f
",n,sum);
return 0;
}