You have to value your ending inventory at cost, i.e. the price you actually paid for the goods remaining in inventory.