class Solution { public int getSum(int n) { boolean flag = (n > 0) && ((n += getSum(n - 1)) > 0); return n; } }