408156: GYM103029 C John, Katya, no nuts
Description
John and Katya are tired of eating nuts. They opened a quiz on Katya's phone, where an answer to the question is a certain non-negative integer.
Each of the two players calls the number and the one which number is closer to the answer wins. Formally, if the correct answer is $$$c$$$ the winner is the one with the minimum value of $$$|x-c|$$$, where $$$x$$$ is someone's answer. If the numbers $$$|x-c|$$$ are equal for both players, then there is no winner.
After a few rounds, John and Katya have relized that the bot that is playing against them will do everything possible to make them win.
John and Katya know that the answer to the question is the number $$$a$$$.
They are wondering if their answer to the question will be $$$b$$$, what is the minimum number that the bot will can output in order for them to win?
InputTwo numbers in single line - $$$0 \le a, b \le 10^9$$$ - real answer to the question, John's and Katya's answer.
OutputThe minimum possible non-negative integer that the bot can output. If the bot hasn't option output the number $$$-1$$$.
ExamplesInput2 6Output
7Input
0 9Output
10Note
In the first test, if the bot outputs the number $$$7$$$, John and Katya will win, since $$$|7 - 2| > |6 - 2|$$$. It can be shown that no number less than $$$7$$$ can be output by the bot.