#include <bits/stdc++.h>
using namespace std;
double fastpow(double a, int n) {
  double r = 1;
  double aa = a;
  while (n > 0) {
    if (n & 1) {
      r *= aa;
    }
    aa *= aa;
    n >>= 1;
  }
  return r;
}
int main() {
  int m, n;
  while (cin >> m >> n) {
    double r = m;
    for (int i = 1; i < m; i++) {
      r -= fastpow(double(i) / m, n);
    }
    cout << fixed << setprecision(9) << r << endl;
  }
}
