A certain class selected some students to participate in festival performances, and wanted to arrange them in a square array, but there were 7 more students; if one was added to each row and column, but 4 students were missing, how many people were selected to perform in total?
某班抽出一些学生参加节日活动表演，想排成一个正方形方阵，结果多出7人；如果每行每列各加一个再排，却少了4人，问共抽出多少人表演？
<gadget id="calculator">7 + 4 + 1</gadget>
<output>12</output>

<gadget id="calculator">12 / 2</gadget>
<output>6</output>

<gadget id="calculator">6 * 6</gadget>
<output>36</output>

<gadget id="calculator">36 - 4</gadget>
<output>32</output>

<result>32</result>