#include <bits/stdc++.h>
using namespace std;
int main() {
  double m, n;
  cin >> m >> n;
  double sum = m;
  for (int i = 1; i < m; i++) {
    double a = pow((double)i / m, n);
    sum -= a;
  }
  printf("%f\n", sum);
  return 0;
}
