print1601. Snail

printSnail

Ограничения: время – 200ms/500ms, память – 32MiB Ввод: input.txt или стандартный ввод Вывод: output.txt или стандартный вывод copy
Послать решение Blockly Посылки Темы Где Обсудить (0)

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.
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 output must contain the number of days that the snail needs to reach the top.

Sample Input 1

2 1 5

Sample Output 1

4

Sample Input 2

5 1 6

Sample Output 2

2

Sample Input 3

100 99 1000000000

Sample Output 3

999999901
Source: COCI 2010/2011, contest #2
loading