#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double x;
int n;
cin >> x >> n;
double ans = 0;
for (int i = 0; i <= n; i++)
{
double s = 1;
int m = i;
while (m--)
{
s *= x;
}
ans += s;
}
cout << fixed << setprecision(2) << ans;
return 0;
}