When the Yangyang School started, the principal was going to give each student a pen. The pens in the store are all in packs of 5 or 3, and cannot be opened for retail sale. A pack of 5 pens is 59 yuan, and a pack of 3 pens is 39 yuan. It is known that Yangyang School has a total of 47 students, so how much does the principal need to spend at least to buy the required pens?
羊羊学校开学时，校长准备给每名学生发一支钢笔．商店中钢笔都是5支一包或3支一包，不能打开零售．5支一包的钢笔59元，3支一包的钢笔39元．已知羊羊学校共有学生47名，那么，校长买所需的钢笔至少需要花多少元．
<gadget id="calculator">7 * 59</gadget>
<output>413</output>

<gadget id="calculator">4 * 39</gadget>
<output>156</output>

<gadget id="calculator">413 + 156</gadget>
<output>569</output>

<result>569</result>