#include <bits/stdc++.h>
using namespace std;
const long long MODPRIME = 1e9 + 7;
const double EPS = 1e-12;
const long long MAXL = 4e18;
const long long MINL = -4e18;
const int MAXI = 2e9;
const int MINI = -2e9;
double m, n;
double ans;
int main() {
  cin >> m >> n;
  cout << fixed << showpoint << setprecision(10);
  ans = m;
  for (int i = 1; i < (int)m; i++) {
    double tmp = (1.00 - 1.00 * i / m);
    ans -= pow(tmp, n);
  }
  cout << ans << '\n';
  return 0;
}
