#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n;
  cin >> m >> n;
  double ans = m;
  double i = 1;
  while (1) {
    if (i >= m) break;
    double j = (m - i) / m;
    double k = 1;
    int q = n;
    while (q != 0) {
      if (q & 1 == 1) k *= j;
      q = q >> 1;
      j *= j;
    }
    if (k <= 0.00000001) break;
    ans -= k;
    i++;
  }
  cout << ans << endl;
}
