Under construction

Still being built. Things may change

Climbing Snail

Interview

Time limit0.25sMemory limit128 MB

Summary
Compute the number of days for a snail climbing A meters by day and sliding B meters by night to reach a pole of height V.
Level

Easy2 of 10

Topics
Math, Simulation
Solved
No attempts yet

Problem

A snail on the ground wants to climb a wooden pole that is V meters tall.

During the day, the snail climbs A meters. While sleeping at night, it slides down B meters. However, once it reaches the top of the pole, it does not slide back down.

Determine how many days the snail needs to reach the top of the pole.

Input

The first line contains three integers A, B, and V, separated by spaces.

1 <= B < A <= V <= 1,000,000,000

Output

Print the number of days needed for the snail to reach the top of the wooden pole.

Examples3

  1. Example 1

    Input
    2 1 5
    
    Expected output
    4
    
  2. Example 2

    Input
    5 1 6
    
    Expected output
    2
    
  3. Example 3

    Input
    100 99 1000000000
    
    Expected output
    999999901