Monocarp has balls painted in red, yellow, and green colors; exactly $$$a$$$ red balls, exactly $$$b$$$ yellow balls, and exactly $$$c$$$ green balls.
Monocarp can perform the following operation an arbitrary number of times:
Your task is to determine the minimum number of operations required to make the number of different colors that the balls are painted equal to two, with the number of balls of each of the two colors being the same.
Adding or removing balls is not allowed.
The first line contains an integer $$$a$$$ ($$$1 \le a \le 1\,000\,000$$$) — the number of red balls.
The second line contains an integer $$$b$$$ ($$$1 \le b \le 1\,000\,000$$$) — the number of yellow balls.
The third line contains an integer $$$c$$$ ($$$1 \le c \le 1\,000\,000$$$) — the number of green balls.
Output the minimum number of operations that Monocarp has to perform to make the number of different colors that the balls are painted equal to two, with the number of balls of each of the two colors being the same.
If this is impossible, output $$$-1$$$.
231
1
254
-1
101010
10
In the first example, it is necessary to repaint the only green ball to red. Then each ball will be either red or yellow, with three red balls and three yellow balls.
In the second example, it is impossible to repaint the balls in such a way that the number of balls of each of the two colors is the same, so you need to output $$$-1$$$.
| Name |
|---|


