Scratch Summation

I wrote a program to help me with a problem in the homework assignment.
It didn't work the sum got too big for my program.