Roma found a new character in the game "World of Darkraft - 2". In this game the character fights monsters, finds the more and more advanced stuff that lets him fight stronger monsters.

The character can equip himself with k distinct types of items. Power of each item depends on its level (positive integer number). Initially the character has one 1-level item of each of the k types.

After the victory over the monster the character finds exactly one new randomly generated item. The generation process looks as follows. Firstly the type of the item is defined; each of the k types has the same probability. Then the level of the new item is defined. Let's assume that the level of player's item of the chosen type is equal to t at the moment. Level of the new item will be chosen uniformly among integers from segment [1; t + 1].

From the new item and the current player's item of the same type Roma chooses the best one (i.e. the one with greater level) and equips it (if both of them has the same level Roma choses any). The remaining item is sold for coins. Roma sells an item of level x of any type for x coins.

Help Roma determine the expected number of earned coins after the victory over n monsters.

Input

The first line contains two integers, n and k (1 ≤ n ≤ 105; 1 ≤ k ≤ 100).

Output

Print a real number — expected number of earned coins after victory over n monsters. The answer is considered correct if its relative or absolute error doesn't exceed 10 - 9.

Examples

Input

1 3


Output

1.0000000000


Input

2 1


Output

2.3333333333


Input

10 2


Output

15.9380768924
777 2
 2 2
 99900 1
 50000 1
 2 5
 100000 99
 22222 22
 100000 4
 100000 1
 100 1
 100 2
 77777 1
 100000 3
 13 20
 66666 6
 1 1
 527 21
 1 100
 11111 1
 99999 1
 99999 2
 1000 1
 10 10
 81702 1
 3456 78
 100000 5
 100000 100
 10 98
 90001 1
 10000 1
 666 66
 99998 1
 98765 1
 100000 12
 93012 1

7711.133204117 2.166666667 14951105.362681892 5303612.978465776 2.066666667 1562974.683985027 347318.195810008 7519794.068457119 14973526.987552967 531.085837171 392.059297628 10276792.312280677 8672913.058441818 14.252518489 3356667.078394883 1.000000000 1551.993280023 1.000000000 559428.984015481 14973302.715951933 10607106.707430664 15549.020583516 11.421704729 11063104.342954138 12907.261392362 6732856.7141528353
 1555455.819511603 10.152199131 12787888.717240792 477990.031393559 1378.605023648 14973078.445468944 14697405.264750529 4369271.391613076 13433937.862080764
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("avx2,avx")
#pragma GCC optimize("unroll-loops")
#pragma GCC target "sse4.2"
using namespace std;
const string YESNO[2] = {"NO", "YES"};
const string YesNo[2] = {"No", "Yes"};
const string yesno[2] = {"no", "yes"};
void YES(bool t = 1) { cout << YESNO[t] << endl; }
void Yes(bool t = 1) { cout << YesNo[t] << endl; }
void yes(bool t = 1) { cout << yesno[t] << endl; }
template <class T>
using pq = priority_queue<T>;
template <class T>
using pqg = priority_queue<T, vector<T>, greater<T>>;
int scan() { return getchar(); }
void scan(int &a) { cin >> a; }
void scan(long long &a) { cin >> a; }
void scan(char &a) { cin >> a; }
void scan(double &a) { cin >> a; }
void scan(string &a) { cin >> a; }
template <class T, class S>
void scan(pair<T, S> &p) {
  scan(p.first), scan(p.second);
}
template <class T>
void scan(vector<T> &);
template <class T>
void scan(vector<T> &a) {
  for (auto &i : a) scan(i);
}
template <class T>
void scan(T &a) {
  cin >> a;
}
void IN() {}
template <class Head, class... Tail>
void IN(Head &head, Tail &...tail) {
  scan(head);
  IN(tail...);
}
template <class T, class S>
inline bool chmax(T &a, const S &b) {
  return (a < b ? a = b, 1 : 0);
}
template <class T, class S>
inline bool chmin(T &a, const S &b) {
  return (a > b ? a = b, 1 : 0);
}
vector<int> iota(int n) {
  vector<int> a(n);
  iota(begin(a), end(a), 0);
  return a;
}
template <typename T>
vector<int> iota(vector<T> &a, bool greater = false) {
  vector<int> res(a.size());
  iota(begin(res), end(res), 0);
  sort(begin(res), end(res), [&](int i, int j) {
    if (greater) return a[i] > a[j];
    return a[i] < a[j];
  });
  return res;
}
template <class T>
T POW(T x, int n) {
  T res = 1;
  for (; n; n >>= 1, x *= x)
    if (n & 1) res *= x;
  return res;
}
vector<pair<long long, long long>> factor(long long x) {
  vector<pair<long long, long long>> ans;
  for (long long i = 2; i * i <= x; i++)
    if (x % i == 0) {
      ans.push_back({i, 1});
      while ((x /= i) % i == 0) ans.back().second++;
    }
  if (x != 1) ans.push_back({x, 1});
  return ans;
}
template <class T>
vector<T> divisor(T x) {
  vector<T> ans;
  for (T i = 1; i * i <= x; i++)
    if (x % i == 0) {
      ans.push_back(i);
      if (i * i != x) ans.push_back(x / i);
    }
  return ans;
}
template <typename T>
void zip(vector<T> &x) {
  vector<T> y = x;
  sort(begin(y), end(y));
  for (int i = 0; i < x.size(); ++i) {
    x[i] = distance((y).begin(), lower_bound(begin(y), end(y), (x[i])));
  }
}
int popcount(long long x) { return __builtin_popcountll(x); }
int in() {
  int x;
  cin >> x;
  return x;
}
long long lin() {
  unsigned long long x;
  cin >> x;
  return x;
}
template <typename T>
struct edge {
  int from, to;
  T cost;
  int id;
  edge(int to, T cost) : from(-1), to(to), cost(cost) {}
  edge(int from, int to, T cost) : from(from), to(to), cost(cost) {}
  edge(int from, int to, T cost, int id)
      : from(from), to(to), cost(cost), id(id) {}
  edge &operator=(const int &x) {
    to = x;
    return *this;
  }
  operator int() const { return to; }
};
template <typename T>
using Edges = vector<edge<T>>;
using Tree = vector<vector<int>>;
using Graph = vector<vector<int>>;
template <class T>
using Wgraph = vector<vector<edge<T>>>;
Graph getG(int n, int m = -1, bool directed = false, int margin = 1) {
  Tree res(n);
  if (m == -1) m = n - 1;
  while (m--) {
    int a, b;
    cin >> a >> b;
    a -= margin, b -= margin;
    res[a].emplace_back(b);
    if (!directed) res[b].emplace_back(a);
  }
  return move(res);
}
template <class T>
Wgraph<T> getWg(int n, int m = -1, bool directed = false, int margin = 1) {
  Wgraph<T> res(n);
  if (m == -1) m = n - 1;
  while (m--) {
    int a, b;
    T c;
    cin >> a >> b >> c;
    a -= margin, b -= margin;
    res[a].emplace_back(b, c);
    if (!directed) res[b].emplace_back(a, c);
  }
  return move(res);
}
template <class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (auto it = begin(v); it != end(v); ++it) {
    if (it == begin(v))
      os << *it;
    else
      os << " " << *it;
  }
  return os;
}
template <class T, class S>
ostream &operator<<(ostream &os, const pair<T, S> &p) {
  os << p.first << " " << p.second;
  return os;
}
template <class S, class T>
string to_string(pair<S, T> p) {
  return "(" + to_string(p.first) + "," + to_string(p.second) + ")";
}
template <class A>
string to_string(A v) {
  if (v.empty()) return "{}";
  string ret = "{";
  for (auto &x : v) ret += to_string(x) + ",";
  ret.back() = '}';
  return ret;
}
void dump() { cerr << endl; }
template <class Head, class... Tail>
void dump(Head head, Tail... tail) {
  cerr << to_string(head) << " ";
  dump(tail...);
}
template <typename T>
static constexpr T inf = numeric_limits<T>::max() / 2;
struct Setup_io {
  Setup_io() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    cout << fixed << setprecision(15);
  }
} setup_io;
int main() {
  int n, k;
  IN(n, k);
  int N = min(n, 8000);
  vector<vector<double>> dp(n + 1, vector<double>(N + 2));
  vector<double> coin(n + 1);
  dp[0][1] = 1;
  for (long long i = 0; i < n; ++i) {
    int J = min<int>(i + 1, N + 1);
    for (long long j = 1; j <= J; ++j) {
      dp[i + 1][j] += dp[i][j] * j / (j + 1);
      dp[i + 1][j + 1] += dp[i][j] / (j + 1);
      coin[i + 1] += dp[i][j] * j * (j + 3) / 2 / (j + 1);
    }
  }
  for (long long i = 0; i < n; ++i) coin[i + 1] += coin[i];
  vector<double> fact(n + 1);
  for (long long i = 0; i < n + 1; ++i) fact[i] = tgamma(i + 1);
  auto C = [&](int i, int j) { return fact[i] / fact[j] / fact[i - j]; };
  double ans = 0;
  double T = powl(1. / k, n);
  if (k == 1) {
    cout << coin[n] << '\n';
    exit(0);
  }
  for (long long i = 1; i <= n; ++i) {
    ans += k * T * C(n, i) * coin[i];
  }
  cout << ans << '\n';
}
