Great Geek Game-show 3000!

No attempts yetTime limit1sMemory limit128 MB

Problem

You have finally been chosen to compete in the "Great Geek Game-show 3000". Any prize is split among all of the contestants, but because your strategy beats random guessing by a wide margin, you can talk everyone into following it — and keep most of the winnings for yourself.

The rules are as follows. On the stage there are $N$ boxes. Each box holds the name of exactly one of the $N$ contestants, and every contestant's name appears in exactly one box, so the boxes form a permutation of the contestants. The contestants come on stage one at a time. Each contestant may look inside at most $K$ boxes. If a contestant finds their own name in one of those boxes, they leave the stage and the next contestant enters. If every contestant finds their own name, everyone wins; if even one of them fails, everyone loses. No communication is allowed once the game begins, but the contestants may agree on a strategy in advance.

Opening $K$ boxes at random wins only rarely, so you propose a better plan. Number the contestants and the boxes $1, \dots, N$. Each contestant first opens the box with their own number. The number found inside that box tells them which box to open next, then they open the box whose number was inside that one, and so on. A contestant keeps following this chain until they either find their own number or have opened $K$ boxes.

If everyone follows this strategy, compute the probability that all of the contestants win.

Input

A single line contains two integers $N$ and $K$.

  • $1 \le N \le 10,000,000$ — the number of contestants.
  • $1 \le K \le N$ — the number of boxes each contestant may open.

Output

Print the probability that everyone wins when all contestants follow the strategy, rounded to exactly six digits after the decimal point.