There are 46 students in class 3 and class 2. At the track and field meeting held by the school, 12 students from class 3 and 2 participated in the individual individual competition, 8 students participated in the relay competition, and 5 students participated in both. How many students in this class participated in the competition? ?
三2班共有46人，在学校举行的田径运动会上，三2班有12人参加个人单项比赛，8人参加接力比赛，两项都参加的有5人，这个班参加比赛的学生共有多少人？
<gadget id="calculator">8 - 5</gadget>
<output>3</output>

<gadget id="calculator">12 + 3</gadget>
<output>15</output>

<result>15</result>