We need to parse the problem carefully. It is a classic problem: climb stairs during day, slide back at night. She starts at 0 (ground). Each day, she climbs A stairs upward; at night, she slides down B stairs. The process repeats. We need the number of days to reach or exceed N (the top). Usually, we consider that if she reaches the top during the day, she stops and does not slide back. So we need the first day when after the climb, her position >= N.
Given constraints: B < A ≤ N ≤ 1e9.
We have to compute days.
Standard solution: The net gain per full day-night cycle is (A - B). But on the last day, she might not slide.
If we consider she climbs each day. Let days d.
We need smallest d such that after d climbs and (d-1) slides (since after last day she doesn't slide if she reaches top), we have position >= N.
So condition: A + (d-1)(A-B) >= N. Because after first day, she climbs A, then slides B, net (A-B) per additional day, but careful: Actually, after d days, she has made d climbs and (d-1) slides. So total height = dA - (d-1)B = d(A-B) + B. Wait compute: dA - (d-1)B = dA - dB + B = d*(A-B) + B.
But is that correct? Let's check: After day 1: climbs to A, slides B => net morning of day 2: A-B. Actually after slide, position = A - B (if not reached top). Then day 2: climbs to (A-B) + A = 2A - B, slides B => net 2A - 2B = 2(A-B). So after d days and d-1 slides, position before next climb is d*(A-B). But after the d-th climb, position = d*A - (d-1)B = d(A-B) + B. Yes.
But careful: That is the height after d climbs, but before the slide of that day (if any). Since we stop when after a climb we are at or above N, we are considering after d climbs (and before slide). So we need smallest d such that d*A - (d-1)*B >= N.
Alternatively, we can think of net progress: If after some days the net before climb is (d-1)(A-B). Then add A: (d-1)(A-B) + A = d*A - (d-1)*B.
So condition: d*A - (d-1)*B >= N.
Simplify: d*(A-B) + B >= N.
So d >= (N - B) / (A - B). But careful: Since d must be integer, minimal d = ceil( (N - B) / (A - B) ).
Check sample: A=5, B=1, N=6. Compute (N - B) = 5, (A - B)=4, division gives 1.25, ceil = 2. Output 2. Works.
Edge case: When N <= A? Actually constraint A <= N, but maybe N could equal A? Check: If N = A, then (N - B)/(A - B) = (A - B)/(A - B) = 1, ceil = 1. So answer 1. That's correct: She climbs A and reaches top in first day. Good.
But what about N < A? Not allowed because A ≤ N, but that's fine.
Now confirm: Sometimes people use formula: (N - A) // (A - B) plus adjustments. But the above is fine.
But be careful: (N - B) could be 0? If N = B? But B < A ≤ N, so N >= A > B, so N > B, so N-B > 0.
Now about integer division: We need to compute ceil division for positive integers. Since denominator positive, numerator positive. Ceil(x/y) = (x + y - 1) // y.
But careful: In our formula, x = N - B, y = A - B.
Thus days = ( (N - B) + (A - B) - 1 ) // (A - B). But check: For sample, N-B=5, A-B=4, sum=8, //4=2. Good.
But is this always correct? Let's test some cases.
Case: A=10, B=3, N=10. Then N-B=7, A-B=7, (7+7-1)//7 =13//7=1? Actually (7+7-1)=13, //7=1. Good. But our direct ceil(7/7)=1.
Case: A=10, B=3, N=11. N-B=8, A-B=7, ceil(8/7)=2, formula (8+7-1)//7=14//7=2.
Case: A=10, B=3, N=17. N-B=14, A-B=7, ceil(14/7)=2, (14+7-1)//7=20//7=2 (since 20/7=2.857 floor 2). Wait 20//7=2? Actually integer division in Python gives floor, 20//7 = 2 (since 27=14, 37=21 too high). So 2, correct.
But if N-B = 15, ceil(15/7)=3, (15+7-1)//7 =21//7=3. Good.
So formula works.
But we should double-check if there's any off-by-one.
Alternative approach: If we consider the net after d-1 full cycles (including slides) the height at start of day d is (d-1)(A-B). Then we need (d-1)(A-B) + A >= N. So d-1 >= (N - A) / (A - B). Then d >= ceil((N-A)/(A-B)) + 1. That yields same.
Check: For N=6, A=5, B=1: (6-5)=1, /4=0.25, ceil=1, +1=2. Good. For N=10, A=10: (10-10)=0, ceil=0, +1=1. Good.
So both consistent.
Thus answer: days = 1 + max(0, ceil((N - A) / (A - B))) but simpler with (N-B) division.
Given constraints up to 1e9, integer arithmetic is fine.
Be careful about potential overflow? Not in Python.
Thus solution: read three ints A, B, N; compute days = (N - B + A - B - 1) // (A - B). But we can compute numerator = N - B, denom = A - B; days = (numerator + denom - 1) // denom.
But check when numerator might be zero? N - B = 0? If N=B, but constraints B<A ≤ N, so N >= A > B, so N > B. So numerator positive. Also denom positive.
Thus answer.
But I recall sometimes similar problems consider that she starts at 0 and after day she climbs, if she reaches N or more she stops. So that formula is correct.
Let's test some more examples manually:
A=3, B=2, N=5. Process: Day1: climb to 3 (<5), night slide to 1. Day2: climb to 1+3=4 (<5), night slide to 2. Day3: climb to 2+3=5 (reached top). So days=3. Our formula: (N-B)=5-2=3, denom=1, (3+1-1)//1=3, days=3.
A=3, B=2, N=3: days=1. (3-2)=1, denom=1, (1+1-1)//1=1.
A=3, B=2, N=4: day1: climb to3 (<4), slide to1. day2: climb to4 (>=4) stop. days=2. formula: N-B=2, denom=1, (2+1-1)//1=2.
A=3, B=1, N=7: day1: climb3, slide to2. day2: climb to5, slide to4. day3: climb to7, stop. days=3. formula: N-B=6, denom=2, (6+2-1)//2 = (7)//2=3.
A=100, B=99, N=1000000000: denom=1, N-B=999999901, days = (999999901+1-1)//1 = 999999901? Wait check: A-B=1, so effectively she climbs 1 net per day. After day1, climbs to 100, slides to 1? Actually careful: A=100, B=99: Day1 climbs to 100, slides to 1. Net gain per day is 1. But she needs to reach N=1e9. Let's simulate: after day d, before slide: d*100 - (d-1)99 = d + 99? Actually compute: dA - (d-1)*B = 100d -99(d-1)=100d-99d+99 = d+99. So after d climbs, she is at d+99. We need d+99 >= 1e9 => d >= 1e9 - 99. So days = 1e9 - 99. Our formula: N-B = 1e9 - 99, denom=1, days = (1e9-99 +1 -1)//1 = 1e9-99. correct.
All good.
Thus output days.
The problem likely from hackathons etc. So solution is straightforward.
But double-check the constraints: 1 ≤ B<A≤N ≤ 10^9. So all ints within 32-bit? 1e9 fits 32-bit signed, but product may not exceed. Python fine.
Now implement solve() reading input, compute, print.
Edge Cases: Check if N <= A? then days = 1. Our formula gives (N-B + A-B -1)//(A-B). If N=A, then N-B = A-B, so (A-B + A-B -1)//(A-B) = (2*(A-B)-1)//(A-B). For A-B=1 => (2-1)//1=1, for A-B=2 => (4-1)//2=3//2=1? Actually 3//2=1, correct. So works. For A-B large, say A-B=10, N-B=10, then (10+10-1)//10=19//10=1. So okay.
Thus final solution.
But wait: Is there any scenario where (N-B) might be less than 0? Not with given constraints.
Thus done.
We can also compute days = (N - A + (A - B) - 1) // (A - B) + 1. But the simpler formula is fine.
Make sure to handle large numbers: Use integer arithmetic.
Implementation:
def solve():
import sys
data = sys.stdin.read().strip().split()
if not data:
return
A, B, N = map(int, data)
diff = A - B
# days = (N - B + diff - 1) // diff
days = (N - B + diff - 1) // diff
print(days)
Alternatively: days = (N - B - 1) // diff + 1? Let's see: Ceil division: (x + y - 1)//y. x = N-B, y = diff. So days = (N-B + diff - 1)//diff.
But sometimes people use: if (N - A) % diff == 0: days = (N - A)//diff + 1 else days = (N - A)//diff + 2? but that's messy.
Thus final.
Now I'll provide the answer.
But the problem statement: "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 format: three integers A, B, N. Output: number of days.
So we implement.
Let's produce the final message with solution explanation and code.
Will also mention edge cases.
Now I'll output final answer. ```python
import sys
def solve() -> None:
data = sys.stdin.read().strip().split()
if not data:
return
A, B, N = map(int, data)
diff = A - B # positive because A > B
# minimal days d such that d*A - (d-1)*B >= N
# which simplifies to (N - B + diff - 1) // diff
days = (N - B + diff - 1) // diff
print(days)
if name == "main":
solve()