Climbing Stairs

3.9

22 votes
Ad-Hoc, Data Structures, Open, Approved, Math, Easy, Mathamatics
Problem

Alice is climbing stairs. There are total N stairs. She climbs A stairs upwards in day and she comes downstairs in night by B stairs. Find number of days she will take to reach the top of staircase.

Input:
First and only line contains three space separated integers denoting A, B, N.

Output:
Print only one line of output denoting the answer to the question.

Constraints:
1 ≤ B<A≤N ≤ 109

Sample Input
5 1 6
Sample Output
2
Time Limit: 1
Memory Limit: 256
Source Limit:
Contributers:
Editor Image

?