#ARC094A. [ABC093C] Same Integers

[ABC093C] Same Integers

Score : 300300 points

Problem Statement

You are given three integers AA, BB and CC. Find the minimum number of operations required to make AA, BB and CC all equal by repeatedly performing the following two kinds of operations in any order:

  • Choose two among AA, BB and CC, then increase both by 11.
  • Choose one among AA, BB and CC, then increase it by 22.

It can be proved that we can always make AA, BB and CC all equal by repeatedly performing these operations.

Constraints

  • 0A,B,C500 \leq A,B,C \leq 50
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

AA BB CC

Output

Print the minimum number of operations required to make AA, BB and CC all equal.

2 5 4
2

We can make AA, BB and CC all equal by the following operations:

  • Increase AA and CC by 11. Now, AA, BB, CC are 33, 55, 55, respectively.
  • Increase AA by 22. Now, AA, BB, CC are 55, 55, 55, respectively.
2 6 3
5
31 41 5
23