Primary school students in a certain district held two mathematics competitions, and the number of students who passed the first time was 3 times more than the number of people who failed; the number of students who passed the second time increased by 12, which was exactly 5 times the number of people who failed. How many students participated in the mathematics competition?
某区小学生进行两次数学竞赛，第一次及格的比不及格的3倍多4人；第二次及格人数增加了12人，正好是不及格人数的5倍．问共有多少学生参加数学竞赛？
<gadget id="calculator">5 * 12</gadget>
<output>60</output>

<gadget id="calculator">4 + 12 + 60</gadget>
<output>76</output>

<gadget id="calculator">5 - 3</gadget>
<output>2</output>

<gadget id="calculator">76 / 2</gadget>
<output>38</output>

<gadget id="calculator">3 * 38</gadget>
<output>114</output>

<gadget id="calculator">38 + 114 + 4</gadget>
<output>156</output>

<result>156</result>