We need to understand the problem: There is a video of length c seconds. To watch one second of video, we need a units of data (bandwidth consumption for playback). The download speed is b units per second (b < a). We need to find the minimum integer t (waiting time) such that if we start watching at time t (i.e., after waiting t seconds, we start playback), then for every time t0 between t and t + c (the playback interval), the amount of data downloaded up to t0 is at least the amount of data needed to watch up to t0 - t seconds (i.e., a * (t0 - t)). This ensures no buffering. We can also continue downloading after we start watching.
Let D(t0) = b * t0 (since we start downloading at time 0). The condition: for all t0 ∈ [t, t+c], b * t0 >= a * (t0 - t). We need to find the smallest integer t >= 0 satisfying this.
We can rewrite: b t0 >= a (t0 - t) => b t0 >= a t0 - a t => bring terms: b t0 - a t0 >= - a t => (b - a) t0 >= - a t. Since b < a, (b - a) is negative. Multiply both sides by -1 (flip inequality): (a - b) t0 <= a t. Or equivalently, t0 <= (a t) / (a - b).
Thus condition becomes: for all t0 in [t, t+c], we must have t0 <= (a t)/(a - b). That is, the entire interval must lie to the left of that point. So we need t + c <= (a t)/(a - b). Because if the maximum t0 (t+c) satisfies the inequality, then all smaller t0 will also satisfy? Wait careful: Since the inequality is t0 <= (a t)/(a - b) and t0 ranges from t to t+c, the condition that for all t0, the inequality holds is equivalent to the maximum t0 (i.e., t + c) satisfying t + c <= (a t)/(a - b). Because if the max satisfies ≤, then all smaller t0 also satisfy ≤. However, we need to check the lower bound: t itself must also satisfy t <= (a t)/(a - b). Is that automatically true? Since t <= (a t)/(a - b) simplifies to 1 <= a/(a - b) => a - b <= a => -b <= 0 => true. So fine.
Thus the condition reduces to:
t + c <= (a t) / (a - b).
We need t integer >= 0 (non-negative integer). Also t must be such that after waiting, playback begins; t can be 0? Possibly if condition holds. But a > b, so we may need positive t. Let's solve inequality:
t + c <= (a t)/(a - b)
Multiply both sides by (a - b) > 0:
(t + c) (a - b) <= a t
=> a t - b t + a c - b c? Wait expand: (t + c)(a - b) = t(a - b) + c(a - b) = a t - b t + a c - b c.
Set inequality: a t - b t + a c - b c <= a t
Cancel a t from both sides: - b t + a c - b c <= 0 => a c - b c <= b t => (a - b) c <= b t
Thus t >= ((a - b) c) / b.
But careful: t must be integer. So the minimum integer t is ceil( ((a - b) c) / b ). However we must also check if this t satisfies the original condition exactly? Let's test with examples.
Example1: a=4,b=1,c=1 => (a-b)c/b = (3*1)/1 = 3 => t >= 3. ceil = 3. Output 3. Works.
Example2: a=10,b=3,c=2 => (7*2)/3 = 14/3 ≈ 4.6667 => ceil=5. Output 5. Works.
Example3: a=13,b=12,c=1 => (1*1)/12 = 1/12 ≈ 0.08333 => ceil=1. Output 1. But perhaps t=0? Let's test: if t=0, condition: for all t0 ∈ [0,1], b t0 >= a * t0 => 12 t0 >= 13 t0 => 12 >=13 (for t0>0) false. So t must be at least 1. So ceil(1/12)=1. So works.
Thus answer = ceil( ( (a - b) * c ) / b ). But is that always sufficient? Derived from inequality t + c <= (a t)/(a - b) which required the condition for all t0. But we need to double-check the original condition: For all t0 ∈ [t, t+c], b t0 >= a (t0 - t). Derived to (a - b) t0 <= a t, which leads to t0 <= (a t)/(a - b). Since the maximum t0 is t+c, we need t+c <= (a t)/(a - b). That is the necessary and sufficient condition. From that we derived (a - b) c <= b t. So t must be >= (a-b)c / b. So the condition is exactly that. Thus t_min = ceil( (a-b)c / b ).
But is there any nuance about integer t? The condition must hold for all real t0, but we derived continuous inequalities, no discretization. So this works.
But wait: The problem says: "the guys want to wait some integer number of seconds for a part of the video to download." So t must be integer. Yes.
Thus answer is: compute (a-b)*c / b as a rational, then take ceiling.
But caution: Could t=0 be allowed? If (a-b)*c = 0? Since a > b, a-b >0, c>=1, so (a-b)*c >0, so (a-b)*c / b >0. So t>0 always? Example3 gave ~0.083 -> ceil=1 >0, so no t=0 possible. So t must be positive.
Now, check edge cases: a,b,c up to 1000, so (a-b)*c could be up to (999)*1000 = 999000, divided by b (>=1) could be up to 999000. Ceil fits in int.
Thus solution is trivial: read a,b,c, compute numerator = (a-b) * c, denominator = b, answer = (numerator + denominator - 1) / denominator.
But careful: integer division ceiling: (numerator + denominator - 1) // denominator.
But also maybe we need to consider if numerator is exactly divisible? Then answer = numerator/denominator.
Thus code:
int a, b, c; cin >> a >> b >> c;
int num = (a - b) * c;
int ans = (num + b - 1) / b;
cout << ans << endl;
That's it.
But wait: The problem statement: "They want to start watching as soon as possible but the connection speed is too low. If they turn on the video right now, it will 'hang up' as the size of data to watch per second will be more than the size of downloaded data per second." Actually, that might mislead that we need to consider that initially there is no data? But we derived that we need enough prebuffered data so that playback never catches up with download. Our condition ensures that at each moment the downloaded amount >= consumed amount. At t0 = t, consumed = 0, downloaded = bt, so that's fine as long as bt >= 0. So condition is consistent.
However, we must verify that at the exact moment t0 = t+c (end of video), the condition is b*(t+c) >= ac, i.e., total downloaded by that time >= total required data. Our condition gave t >= (a-b)c/b, which yields bt >= (a-b)c => bt + bc >= ac? Let's check: bt >= (a-b)c => bt + bc >= ac? Actually bt >= (a-b)c implies bt + bc >= (a-b)c + bc = ac. So total downloaded by t+c is b(t+c) >= a*c. So that is included.
Thus everything matches.
Hence answer is straightforward.
But wait, is there any scenario where a different t, not satisfying t >= ((a-b)c)/b, could still work? Suppose t is such that t + c > (a t)/(a - b). But perhaps the inequality b t0 >= a (t0 - t) might hold for all t0 even if t+c > (a t)/(a-b) because the derived condition might be not exactly equivalent if the inequality reversed due to sign? Let's re-derive carefully: Condition: ∀ t0 ∈ [t, t+c], b t0 >= a (t0 - t). Rearr: b t0 >= a t0 - a t => bring a t0 to left: b t0 - a t0 >= - a t => (b - a) t0 >= - a t. Since (b - a) < 0, dividing by a negative flips direction: t0 <= (- a t) / (b - a) = a t / (a - b). So indeed the condition is t0 <= a t / (a - b) for all t0 in that interval. So the condition is that the supremum of t0 in the interval (t+c) must be ≤ that bound. So it is necessary and sufficient. So no other t.
Thus answer is ceil((a-b)c / b).
Now, we should also consider if t must be integer, but also could be fractional? Problem says integer. So ceil is correct.
Implementation in Python or C++ is trivial.
But before finalizing, let's test some more examples manually.
Case: a=2,b=1,c=1 -> (11)/1=1 -> t>=1? t=1: then total download by start: bt=1. At start (t0=1), need 0. At t0=2 (end), download=2, consumption=1, ok. So t=1 works. t=0? download at t0=0? Actually start at 0, need a0=0, but at t0=0.1? Condition fails? At t0=1, download=1, consumption=1, but for t0 in (0,1) we need check: for any t0, consumption a(t0) =2 t0, download b*t0 = t0, fails for t0>0. So t=0 fails. So answer 1.
Case: a=5,b=4,c=1 -> (1*1)/4=0.25 -> ceil=1. t=0? check: at t0=0:0>=0; at t0=0.5: download=2, consumption=2.5? fails. So t=1 works.
Now edge: a=1000,b=1,c=1000 -> (999*1000)/1 = 999000 -> t=999000. That seems huge but manageable.
Now one nuance: The condition we derived is continuous. But perhaps we should consider that the playback occurs in discrete seconds? But problem treats time as continuous, with data amounts per second. The condition uses "per second" rates but they are rates. So continuous is fine.
Thus solution is straightforward.
Now, there might be a pitfall: The answer might be 0 if a <= b? But constraint says a > b, so no.
Thus final answer: compute t = ceil((a-b)*c / b). Print t.
Now, write in Python:
def main():
import sys
a,b,c = map(int, sys.stdin.read().split())
num = (a-b)*c
ans = (num + b - 1) // b
print(ans)
Check with examples:
4 1 1: (31)=3, (3+0)//1=3 -> output 3.
10 3 2: (72)=14, (14+2)//3=16//3=5 -> correct.
13 12 1: (1*1)=1, (1+11)//12=12//12=1 -> correct.
Edge: a=2,b=1,c=1: (1*1)=1, (1+0)//1=1 -> correct.
Thus solution.
But is there any scenario where the waiting time could be less than this if we consider that after start, the download continues, and maybe we only need to ensure that at each second the buffer does not empty? In continuous, it's the same.
Thus answer.
Now produce final answer with explanation. ```python
import sys
def main() -> None:
data = sys.stdin.read().strip().split()
if not data:
return
a, b, c = map(int, data)
num = (a - b) * c # numerator of (a-b)*c / b
# ceil division: (num + b - 1) // b
ans = (num + b - 1) // b
print(ans)
if name == "main":
main()