Use a for loop, for each loop iteration calculated the value of the current term and then add the result to a variable that was initialised before the loop started. At the end of the loop the variable will contain your result, assuming that the maths remained with-in the bounds of the platform.
Comment