Declare a variable with value 0 above the for loop, add totals to this variable's value on each loop, and display the value of the variable as you do with totals after the for loop.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results