#include <bits/stdc++.h>
using namespace std;
const double eps = (1e-9);
int main() {
  double ans;
  int n, m, i, j;
  cin >> m >> n;
  ans = 0;
  for (i = 0; i <= m - 1; i++) {
    double tmp = 1;
    double div = i * 1.0 / m;
    for (j = 0; j < n; j++) {
      tmp = tmp * div;
      if (tmp < eps) break;
    }
    ans += (1 - tmp);
  }
  cout << ans << endl;
  return 0;
}
