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.
The first line contains two integers y_1,b_1 (0\le y_1,b_1\le 100) — the number of yellow and blue balls in the first box, respectively.
The second line contains two integers y_2,b_2 (0\le y_2,b_2\le 100) — the number of yellow and blue balls in the second box, respectively.
The third line contains two integers y_3,b_3 (0\le y_3,b_3\le 100) — the number of yellow and blue balls in the third box, respectively.
Output a single number — the minimum number of rearrangements.
Example
Example 1
Explanation for the first test:


