Asrit wants to fry beef. He has a large pan that can hold at most $$$n$$$ pieces of beef at the same time.
The rules for frying the beef are as follows:
Specifically, a piece of beef can be picked up or put down at any time. If not all $$$k$$$ sides of a piece of beef are cooked, it can be temporarily removed from the pan and put back later to continue cooking the uncooked sides.
Now, Asrit wants to cook a total of $$$m$$$ pieces of beef. Please help him calculate the minimum number of seconds required.
The first line of input contains three integers $$$n, m, k$$$ $$$(1 \le n, k \le 10^6, 1 \le m \le 10^{10})$$$, representing the maximum number of pieces of beef the pan can hold simultaneously, the total number of pieces of beef to be cooked, and the number of sides of each piece of beef, respectively.
Output a single integer on one line, representing the minimum number of seconds required to cook all the beef.
2 3 2
3
| Name |
|---|


