#include <bits/stdc++.h>
using namespace std;
double res;
double ksm(double x, int y) {
  double r = 1, t = x;
  while (y) {
    if (y & 1) r *= t;
    t *= t;
    y >>= 1;
  }
  return r;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  ;
  int n, m;
  scanf("%d%d", &m, &n);
  res = m;
  for (double i = 1; i < m; i++) {
    res -= ksm(i / m, n);
  }
  printf("%.10f", res);
}
