C. Repainting Balls
time limit per test
1 second
memory limit per test
512 megabytes
input
standard input
output
standard output

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:

  • choose any ball and repaint it in another color: a red ball into yellow or green, a yellow ball into red or green, a green ball into red or yellow.

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.

Input

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

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$$$.

Examples
Input
2
3
1
Output
1
Input
2
5
4
Output
-1
Input
10
10
10
Output
10
Note

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$$$.