Calculating Total Cost and Quantity