Corrected integer type limits to handle large sums.