#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000000,100000000000")
using namespace std;
const double eps = 1E-9;
const double Exp = 2.718281828459045;
const double Pi = 3.1415926535897932;
const int NMAX = 100000 + 5;
const int MMAX = 100000 + 5;
const int INF = 1000000000;
const int BASE = 1000000007;
template <typename T>
inline T abs(const T a) {
  if (a < 0) return -a;
  return a;
}
template <typename T>
inline T sqr(const T& a) {
  return a * a;
}
int main() {
  ios::sync_with_stdio(false);
  int n, m, i;
  double ans;
  double d;
  cin >> m >> n;
  ans = m;
  for (i = 1; i <= m; i++) {
    d = pow((m - i) / 1.0 / m, n);
    if (d < eps) break;
    ans -= d;
  }
  cout << setprecision(9) << fixed << ans << endl;
  return 0;
}
