Problem list
Log in
#coci00157 · COCI 2010/2011 Contest 2

Puž

Bronze I 0.1 s 32 MB

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.

Input

The first and only line of input contains three integers separated by a single space: $A$, $B$, and $V$ ($1 \le B < A \le V \le 1,000,000,000$), with meanings described above.

Output

The first and only line of output must contain the number of days that the snail needs to reach the top.

Example 1

Input
2 1 5
Output
4

Example 2

Input
5 1 6
Output
2

Example 3

Input
100 99 1000000000
Output
999999901
Source
COCI 2010/2011 Contest 2
Appears in
Not part of a ladder, contest or set yet.
Accepted 1 Submissions 1 Acceptance 100% Solvers 1

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code