#include <bits/stdc++.h>
using namespace std;
string c[8] = {"vaporeon", "jolteon", "flareon", "espeon",
               "umbreon",  "leafeon", "glaceon", "sylveon"};
int main() {
  cout.setf(ios::fixed);
  cout.precision(12);
  int m, n;
  cin >> m >> n;
  double res = m;
  for (int i = 1; i <= m; i++) {
    res -= (double)pow(i * 1.0 / m, n);
  }
  cout << double(res) + 1 << endl;
  return 0;
}
