Calculating the quantity of gas purchased