There are 47 students in the school who want to participate in the sports meeting in the city, and each of them needs to prepare one red and one white sweatshirt. The prices of the two kinds of sweatshirts in the store are as follows: red sweatshirts are 61 yuan per pack of 5 pieces, 40 yuan per pack of 3 pieces, and 15 yuan per piece in retail; 70 yuan per pack of 5 white sweatshirts Yuan, 47 yuan per pack of 3 pieces and 18 yuan per piece for retail. What is the minimum cost for the school to buy these sweatshirts?
学校有47名同学要参加市里的运动会，每人需要准备红色和白色的运动衫各1件．商店里两种运动衫的价格如下：红色运动衫5件1包的每包61元，3件1包的每包40元，零售每件15元；白色运动衫5件1包的每包70元，3件1包的每包47元，零售每件18元．学校买这批运动衫至少要花多少元？
<gadget id="calculator">61 * 9</gadget>
<output>549</output>

<gadget id="calculator">2 * 15</gadget>
<output>30</output>

<gadget id="calculator">549 + 30</gadget>
<output>579</output>

<gadget id="calculator">70 * 9</gadget>
<output>630</output>

<gadget id="calculator">18 * 2</gadget>
<output>36</output>

<gadget id="calculator">630 + 36</gadget>
<output>666</output>

<gadget id="calculator">579 + 666</gadget>
<output>1_245</output>

<result>1_245</result>