A restaurant's beginning inventory is $8,000, purchases total $22,000, and ending inventory is $6,000.What is the cost of goods sold?