#include <bits/stdc++.h>
using namespace std;
const double ex = 1e-6;
double pow(double x, int n) {
  double ret = 1;
  while (n) {
    if (n % 2) ret *= x;
    n >>= 1;
    x *= x;
  }
  return ret;
}
int main() {
  double n;
  int m;
  while (scanf("%lf %d", &n, &m) != EOF) {
    double ans = n;
    double i = n - 1;
    double k;
    for (i; i >= 1; i -= 1) {
      k = pow(i / n, m);
      if (k < ex) break;
      ans -= k;
    }
    printf("%0.4lf\n", ans);
  }
}
