The school set up two interest groups, and 42 people from Class 3 and Class 1 signed up to participate in the activity, including 27 people who participated in the painting and calligraphy group, and 24 people who participated in the chess group. How many people participated in both groups.
学校开设了两个兴趣小组，三1班42人都报名参加了活动，其中参加书画小组的有27人，参加棋艺小组有24人．两个小组都参加的有多少人．
<gadget id="calculator">24 - 42</gadget>
<output>-18</output>

<gadget id="calculator">27 + (-18)</gadget>
<output>9</output>

<result>9</result>