Consider the running time for adding the ith element, and characterize the total running time using a summation.