#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  ios::sync_with_stdio(0);
  cout << setiosflags(ios::fixed) << setprecision(10);
  while (cin >> n >> m) {
    double answer = n;
    for (int i = n - 1; i > 0; --i) {
      answer -= pow((i * 1.0 / n), m);
    }
    cout << answer << endl;
  }
  return 0;
}
