#B3984. Minimum Days to Reach Target
Minimum Days to Reach Target
Minimum Days to Reach Target
Little B loves programming. He has already solved \( x \) problems. In the upcoming days, he can solve either \(1\) or \(2\) problems per day. Determine the minimum number of days required for him to have solved at least \( y \) problems. Mathematically, if \(x < y\), the answer is given by \(\lceil \frac{y-x}{2} \rceil\); otherwise, the answer is 0.
inputFormat
The input consists of two space-separated integers \(x\) and \(y\), where \(x\) is the number of problems already solved and \(y\) is the target number of problems.
outputFormat
Output a single integer representing the minimum number of days required to reach at least \( y \) problems.
sample
10 10
0