The school set up two interest groups, 39 people from Class 3 and Class 2 participated in the activities, 21 of them participated in the painting and calligraphy group, and 24 participated in the art group. How many people participated in both groups?
学校开设两个兴趣小组，三2班39人都参加了活动，其中21人参加书画小组，24人参加美术小组，两个小组都参加的有多少人
<gadget id="calculator">24 - 39</gadget>
<output>-15</output>

<gadget id="calculator">21 + (-15)</gadget>
<output>6</output>

<result>6</result>