#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9')
    x = (x << 3) + (x << 1) + f * (c - '0'), c = getchar();
  return x;
}
const long long MAXN = 1e5 + 10;
long long n, m;
double f[MAXN];
double ans;
void ycl() {
  long long x = n;
  double a[MAXN], b[MAXN];
  for (long long i = 1; i <= m; i++) a[i] = (double)i / m, b[i] = 1;
  while (x > 0) {
    if (x % 2 == 1) {
      for (long long i = 1; i <= m; i++) b[i] *= a[i];
    }
    for (long long i = 1; i <= m; i++) a[i] *= a[i];
    x /= 2;
  }
  for (long long i = 1; i <= m; i++) f[i] = b[i];
}
signed main() {
  m = read();
  n = read();
  ycl();
  for (long long i = 1; i <= m; i++) ans += (double)(f[i] - f[i - 1]) * i;
  printf("%lf\n", ans);
  return 0;
}
