e-olymp
Problems

New-year tree

New-year tree

prb23 For decoration of the New-year tree Peter has in the order a garland from the N lamps and К of different paints for their painting. How many methods can he to do it, if he must no 2 identical colors be alongside?

Input

The amount of lamps is N, the amount of different paints is К. (1K, N15).

Output

Amount of methods of painting. If Peter can not paint a garland after the described requirements, to show out -1.

Time limit 1 second
Memory limit 64 MiB
Input example #1
6 2
Output example #1
2