#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double INF = 1e20;
const double PI = acos(-1.);
const int MXN = 50;
const long long MOD = 1000000007;
double F[100010], p[100010];
double E;
int n, m;
double cal_pow(int k, double p) {
  if (k == 0) return 1.0;
  double q, ret = 1;
  int i;
  q = p;
  if (k & 1) ret *= q;
  for (i = 2; i <= k; i <<= 1) {
    q = q * q;
    if (k & i) ret *= q;
  }
  return ret;
}
int main() {
  int i, j;
  scanf("%d%d", &m, &n);
  F[0] = 0.0;
  for (i = 1; i <= m; i++) {
    F[i] = cal_pow(n, double(i) / m);
    p[i] = F[i] - F[i - 1];
  }
  E = 0;
  for (i = 1; i <= m; i++) E += double(i) * p[i];
  printf("%.5lf\n", E);
  return 0;
}
