In the third grade of Yale School, a group of students participated in swimming and running competitions. Among them, 142 students participated in swimming, 138 students participated in running, 18 students participated in both, and 150 students did not participate. How many students are there in the third grade of Yale School?
雅乐学校三年级有一批同学参加游泳、跑步比赛，其中参加游泳的同学142人，参加跑步的有138个同学，两项都参加的有18人，有150人没有参加．雅乐学校三年级共有多少名同学．
<gadget id="calculator">138 - 18</gadget>
<output>120</output>

<gadget id="calculator">142 + 120 + 150</gadget>
<output>412</output>

<result>412</result>