In a spring sports meeting, 14 out of 30 people from Class 51 participated in the track competition, 9 participated in the field competition, and 12 did not participate in both. How many people participated in both the track competition and the field competition?
在一次春季运动会上，五1班30人中有14人参加径赛，9人参加田赛，两项都没参加的有12人，既参加径赛又参加田赛的有多少人？
<gadget id="calculator">30 - 12</gadget>
<output>18</output>

<gadget id="calculator">9 - 18</gadget>
<output>-9</output>

<gadget id="calculator">14 + (-9)</gadget>
<output>5</output>

<result>5</result>