Calculating the Sum of a Vector