simplify 1/2 * (n - 1)n + (n - 1) + c