The third-grade students stood in a square formation to do exercises. There were the same number of people in each row and the same number of people in each column. They stood in the 7th column from the left and the 15th column from the right; He is the 16th from the back. How many people are there in the third grade?
三年级同学站成一个方阵做操，每行的人数同样多，每列的人数也同样多，明明站在左起第7列，右起第15列；从前数他是第9个，从后面数他是第16个．三年级一共有多少人？
<gadget id="calculator">15 - 1</gadget>
<output>14</output>

<gadget id="calculator">7 + 14</gadget>
<output>21</output>

<gadget id="calculator">9 - 1</gadget>
<output>8</output>

<gadget id="calculator">16 + 8</gadget>
<output>24</output>

<gadget id="calculator">21 * 24</gadget>
<output>504</output>

<result>504</result>