You are given three integers \(n\), \(m\), and \(k\). In a single move, you can subtract any integer in the range from \(1\) to \(m\) from \(n\), but you are not be allowed to subtract this integer during the next \(k\) moves. What is the minimum number of moves required to make \(n\) strictly smaller than 0?
Input format
The first and only line of input contains three integers \(-\) \(n, m, k\)
Output format
Print an integer denoting the answer to the problem.
Constraints
\(1 \le n, m \le 10^{9}\)
\(1 \le k \le 10^{5}\)
\(k < m\)
In the first move, you can subtract 1, in the second move you can subtract 3, in the third move you can subtract 4. So, you can make \(n\) equal to -1 after 3 moves.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor