Hide

Problem F
Cat Toys

/problems/cuhs.cattoys/file/statement/en/img-0001.jpg
Skimpy and Mister Blue right after losing one toy to the couch

The cats Skimpy and Mister Blue love playing together, but a lot of their toys end up under the couch. Originally all their $N$ toys are available to play with, and after each day $K$ of them will end up under the couch (or all of them if there are fewer than $K$ toys left).

Whenever there are no toys left the cats start meowing, so that their humans know that they have to remove all the toys from under the couch.

Input

The input contains a single line with two integers: $N$ and $K$ as described above. $1 \le N \le 10^{9}$ and $1 \le K \le 10^{9}$.

Output

The output should contain a single integer, the number of days until the cats start meowing because all their toys are under the couch.

Sample Input 1 Sample Output 1
100 5
20
Sample Input 2 Sample Output 2
101 5
21
Sample Input 3 Sample Output 3
10 20
1

Please log in to submit a solution to this problem

Log in