how do you calculate Ending Inventory if beginning inventory is 15000 the purchases is 24,000 and the cost of good sold is 23,000.