double cal(double x,int n)
{
double s=1.0;
double t=1.0;
int i;
for (i=1;i<=n;i++)
{
t=t*x/(double)i;
s+=t;
}
return(s);
}
main()
{
double x; int n;
scanf("%Lf %d", &x,&n); // L要改成小写
printf("%Lf",cal(x,n));
}
double cal(double x,int n)
{
double s=1.0;
double t=1.0;
int i;
for (i=1;i<=n;i++)
{
t=t*x/(double)i;
s+=t;
}
return(s);
}
main()
{
double x; int n;
scanf("%lf %d", &x,&n); printf("%lf",cal(x,n));
}
float s=1.0,t=1,x1=1;
int i;
for(i=1;i<=n;i++)
{
t*=i;
x1*=x;
s+=x1/t;
}