#include <stdio.h>
#include <math.h>
int main(){
double x;
double sum = 1.0;
double term = 1.0;
int k = 1;
if (scanf("%lf", &x) != EOF && x >= 0 && x <= 5) {
while (fabs(term) > 0.00001) {
term *= x / k;
sum += term;
k++;
}
printf("%.4f", sum);
} else {
printf("input x wrong");
}
return 0;
}