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;
}
}
![](https://velog.velcdn.com/images/as9587/post/cf4ed4d7-7708-4392-9a95-7b9e69282c50/image.png)