The store buys a batch of shirts at a price of 50 yuan each, and sells them at 70 yuan. When there are only 7 shirts left, the store sells them at a discount of 20% off the original price. In the end, the store made a total profit of 702 yuan, so how many shirts did the store buy in total?
商店以每件50元的价格购进一批衬衫，售价为70元，当卖到只剩下7件的时候，商店以原售价的8折售出．最后商店一共获利702元，那么商店一共进了多少件衬衫？
<gadget id="calculator">7 * 70</gadget>
<output>490</output>

<gadget id="calculator">80 / 100</gadget>
<output>4/5 = around 0.8</output>

<gadget id="calculator">70 * (4/5) * 7</gadget>
<output>392</output>

<gadget id="calculator">702 - 392</gadget>
<output>310</output>

<gadget id="calculator">490 + 310</gadget>
<output>800</output>

<gadget id="calculator">70 - 50</gadget>
<output>20</output>

<gadget id="calculator">800 / 20</gadget>
<output>40</output>

<result>40</result>