Problem K
Troll Hunt
Apprehensive of its imminent decapitation, the troll fled, and did not have the decency to even leave a forwarding address. Being a troll, it was clear that the troll was hiding under some other stone bridge than the one it had used for its shady business practice, but which? The knights decided to split up in groups and go search. Since a group needed to be able to avoid being eaten once the troll was found, each group had to consist of at least a certain number of knights. Each group of knights could search under one stone bridge per day (and travelling between bridges was done at lightning speed, thanks to the knights’ renowned iTravel™ technology). While clever enough to flee from its hunting ground, the troll is not bright enough to keep moving between different bridges: once the hunt starts, the troll stays in the same place. How many days would it take until the troll would surely have been found?
Input
The input consists of a single line containing three integers $b$, $k$ and $g$, where $2 \le b \le 1000$ is the number of stone bridges in the land, $1 \le k \le 100$ is the number of knights, and $1 \le g \le k$ is the number of knights needed in each group.
Output
Output a line containing a single integer $d$, the number of days until the troll is sure to have met its destiny.
Sample Input 1 | Sample Output 1 |
---|---|
5 2 1 |
2 |
Sample Input 2 | Sample Output 2 |
---|---|
10 5 2 |
5 |