Олимпиадный тренинг

Задача 42262. midpoint


Gromozeka and Alice are playing the following game. Initially, they put three points on the number line in integer coordinates. Then, one of them erases any extreme point and puts it in the middle between the two remaining ones in a coordinate with an integer. If there is an even number of integers between the remaining points, then you can put a point in any of them.

For example, if initially there were points at coordinates 3, 6, 8, then the first move can be to erase the point with coordinate 3 and put it in coordinate 7. Or erase the point with coordinate 8 and put it in coordinate 4 or 5.

In order not to think for a long time, Gromozeka and Alice decided that they would spend no more than two seconds on each move.

You will be asked to calculate the maximum number of seconds the game will last if the starting positions of the three dots are known.

Input
The program takes as input three integers A, B and C (1<=A < B < C <= 1000). Each number is written on a new line.

Imprint
Print the answer to the problem.
 
 
Examples
# Input Output
1 3
6
8
4