each day, with the game starting on day
.
people over a course of
days. In other words, there must be exactly
infected people on day
. Help him find the minimum number of patient zeros he would have to create to complete his mission.
Constraints
For all subtasks:
Subtask 1 [20%]
Subtask 2 [20%]
Subtask 3 [60%]
No additional constraints.
Input Specification
The only line of input will have ,
, and
, separated by spaces.
Output Specification
Output the required answer, the minimum number of patient zeros
would have to create.Sample Input 1
8 2 1
Sample Output 1
4
Sample Input 2
9 3 2
Sample Output 2
1
Sample Input 3
10 7 10
Sample Output 3
4
Explanation for Sample Outputs
In the first case, the optimal solution is to infect people on day
.
In the second case, . On day
there will be
people infected. And on day
there will be
, as required.
In the third case, , infect one person, then infect
more on day
.
Comments