puz-COCI
There is a snail on the ground. It wants to climb to the top of a wooden pole with the height of V meters, measuring from the ground level. In one day it can climb A meters upwards, however during each night it sleeps, sliding B meters back down.
Determine the number of days it needs to climb to the top.
InputINPUT
The first and only line of input contains three integers separated by a single space: A, B and V (1 ≤ B < A ≤ V ≤ 1 000 000 000), with meanings described above.
The first and only line of input contains three integers separated by a single space: A, B and V (1 ≤ B < A ≤ V ≤ 1 000 000 000), with meanings described above.
OutputOUTPUT
The first and only line of output must contain the number of days that the snail needs to reach the top.
The first and only line of output must contain the number of days that the snail needs to reach the top.
input :
2 1 5
output :
4
input :
5 1 6
output :
2
input :
100 99 1000000000
output :
999999901
Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.