#include<bits/stdc++.h>
using namespace std;
long long n;
double x,now=1.0,ans=1.0;
long long read(){
long long x=0,sgn=1;char ch=getchar();
while(ch<'0' || ch>'9'){if(ch=='-')sgn=-1;ch=getchar();}
while(ch>='0' && ch<='9'){x=(x<<3)+(x<<1)+(ch&15);ch=getchar();}
return x*sgn;
}
int main(){
cin>>x;
n=read();
for(int i=1;i<=n;i++){
for(int j=1;j<=i;j++)
now=now*x;
ans+=now;
now=1.0;
}
printf("%.2lf",ans);
return 0;
}