#include <stdio.h>
#include <stdlib.h>
#include <math.h>
double getSum(int a){ //返回值要是double才行,不然x最大的时候验证不通过
double count = 1;
while(a>0){
count *= a;
a--;
}
return count;
}
int main(){
double x,count = 1;
int i = 1;
scanf("%lf",&x);
while(pow(x,i)/getSum(i) >= 0.00001){
count += pow(x,i)/getSum(i);
i++;
}
count += pow(x,i)/getSum(i); //最后一项的绝对值小于0.00001
printf("%.4lf",count);
}