int () { int a = first >= MAX_VALUE ? first % MAX_VALUE : first; int b = second >= MAX_VALUE ? second % MAX_VALUE : second; int sum = a + b; if (sum >= MAX_VALUE) sum = sum % MAX_VALUE; return sum * (sum + 1) / 2 + a; }