A company using the periodic inventory system has the following account balances: merchandise inventory at the beginning of the year, $4 479; freight in, $660, Purchase, $16,196; Purchases returns and allowances, $3560; purchases discounts, $394. The cost of merchandise purchased is equal to