Solved the number of sums