#include <bits/stdc++.h>
using namespace std;
long double poww(long double a, int x) {
  long double res = 1;
  long double t = a;
  while (x) {
    if (x % 2 == 1) res *= t;
    x /= 2;
    t = t * t;
  }
  return res;
}
int main() {
  long double m;
  int n;
  cin >> m >> n;
  cout.precision(9);
  cout << fixed;
  long double ans = m;
  for (int i = 0; i < m; ++i) ans -= poww(i / m, n);
  cout << ans;
  return 0;
}
