Colorful Balls
Bodya found three boxes on the way to school. Each box contains a certain number of yellow and blue balls. Bodia decided to arrange them in such a way that one of the three boxes would be empty, one would contain only yellow balls, and one would contain only blue balls.
Bodya doesn't want to be late for the first lesson, help him determine the minimum number of rearrangements to organize the balls in the boxes.
Input
The first line contains two integers — the number of yellow and blue balls in the first box, respectively.
The second line contains two integers — the number of yellow and blue balls in the second box, respectively.
The third line contains two integers — the number of yellow and blue balls in the third box, respectively.
Output
Output a single number — the minimum number of rearrangements.
Examples
Note
Explanation for the first test: