class Solution {
public int solution(int[] sides) {
int bigValue = Math.max(sides[0], sides[1]);
int smallValue = Math.min(sides[0], sides[1]);
int lowLimit = bigValue - smallValue;
int highLimit = bigValue + smallValue;
return highLimit - lowLimit - 1;
}
}