The first thing I had in mind was: the final answer needed to be /2. keeping the number before dividing not overflowing needs some tedious work
It's not very tedious. Instead of dividing the product by 2, you can just divide whichever of x or x+1 is even by 2 before multiplying.
It's not very tedious. Instead of dividing the product by 2, you can just divide whichever of x or x+1 is even by 2 before multiplying.