USACO 2023 February Contest, Silver Problem 1. Bakery

Hello,

Link to problem: USACO
Link to solution: Contest Results

on this line of code for solution:
lx = max(lx, (-c + b * d + (b - a - 1)) // (b - a))

shouldn’t this be lx = max(lx, (-c + b * d) // (b - a)) ?

How did they derive (b - a - 1)? I’m confused

Thanks

Ceiling division: Is there a ceiling equivalent of // operator in Python? - Stack Overflow

thanks!
i’ll post my solution with comments so other people know