#include <bits/stdc++.h>
using namespace std;
int main() {
  double m, n;
  cin >> m >> n;
  double rez = m;
  for (int i = 1; i < m; i++) {
    rez -= pow(i / m, n);
  }
  cout << setprecision(15) << rez;
}
