Summing and printing all values in a list