To break a coconut, monkeys usually climb to the roof of an -storey building and drop coconuts from the top. One clever monkey, tired of constantly climbing to the roof, decided to find the lowest floor from which a dropped coconut will break. The monkey can climb to any floor from to (the roof is considered to be the -th floor) and throw a coconut out the window. If the coconut does not break when dropped, the monkey can use it again for further experiments. The monkey has exactly coconuts prepared for the experiments. The monkey needs to determine the desired floor number, using no more than coconuts. Also, the monkey would like to find the floor with the minimum number of throws, since it can only carry one coconut at a time, and for each throw, it must go down to the ground for another coconut prepared for experiments or for a previously thrown but unbroken coconut.
Write a program to plan the experiments in a way that minimizes the number of throws in the worst case. The plan must consider that the required floor could be any floor from to , or it may be that the coconut only breaks when dropped from the roof.
The first line contains two integers separated by a space: the number of floors in the building (1 \le n \le 1000000) and the number of coconuts (1 \le k \le 1000).
Output the minimum number of experiments in the worst case.
Example 1