A store bought a batch of pens, each pen was 8 yuan when it was purchased, and each pen was 12 yuan when it was sold. Now there are 40 pens in the store. In addition to the cost, the profit has been 320 yuan. How many pens did the store buy.
某商店购进一批笔，购进时每支8元，卖出时每支12元，现在商店还有40支笔，除成本外，已获得利润320元，商店购进笔多少支．
<gadget id="calculator">12 * 40</gadget>
<output>480</output>

<gadget id="calculator">480 + 320</gadget>
<output>800</output>

<gadget id="calculator">12 - 8</gadget>
<output>4</output>

<gadget id="calculator">800 / 4</gadget>
<output>200</output>

<result>200</result>