#include <bits/stdc++.h>
using namespace std;
int c[100010] = {0};
int main() {
  int n, m, t, i;
  float tmp1, tmp = 0;
  double b;
  int flag = 1, flg2 = 1;
  cin >> m >> n;
  b = m;
  for (t = 1; t < m; t++) {
    b -= pow((double)t / m, n);
  }
  cout << b;
  return 0;
}
