Жишээ тэстүүд

Оролт
1 1 1 2
Гаралт
4
Оролт
1 2 3 1
Гаралт
2
Оролт
10 2 1 7
Гаралт
0

Тэмдэглэл

In the first sample test you can either not increase any stick or increase any two sticks by $1$ centimeter.

In the second sample test you can increase either the first or the second stick by one centimeter. Note that the triangle made from the initial sticks is degenerate and thus, doesn't meet the conditions.