The number of fifth grade students in a school is between 300 and 400. There are 3, 5 or 7 students in each row, and there are only 2 students in the last row. How many fifth grade students are there in this school?
某校五年级学生人数在300～400名之间，学生按每排3人、5人或7人，最后一排都只有2人．这个学校五年级有多少名学生．
<gadget id="calculator">3 * 5 * 7</gadget>
<output>105</output>

<gadget id="calculator">105 * 3</gadget>
<output>315</output>

<gadget id="calculator">315 + 2</gadget>
<output>317</output>

<result>317</result>