There are 49 people in the third and second classes, 24 people in the sports group, 16 people in the handicraft group, and 9 people in both groups. How many people don't participate in both groups?
三二班有49人，参加体育小组的有24人，参加手工制作小组的有16人，两个小组都参加的有9人，有多少人两个小组都没参加？
<gadget id="calculator">16 - 9</gadget>
<output>7</output>

<gadget id="calculator">24 + 7</gadget>
<output>31</output>

<gadget id="calculator">49 - 31</gadget>
<output>18</output>

<result>18</result>