There are 6 classes in the third grade, with an average of 42 students in each class, and a total of 345 students in the fourth grade. How many students are there in the third and fourth grades?
学校三年级有6个班，平均每班42人，四年级共有345人．三、四年级共有多少人？
<gadget id="calculator">42 * 6</gadget>
<output>252</output>

<gadget id="calculator">252 + 345</gadget>
<output>597</output>

<result>597</result>