There are 42 people in Class 6 (1), among them 28 people participated in the mathematics interest group, 14 people participated in the Chinese interest group, and 10 people did not participate in both groups. How many people participated in both groups?
六(一)班有42人，其中有28人参加数学兴趣小组，14人参加语文兴趣小组，有10人两个小组都没有参加，有多少人两个小组都参加了．
<gadget id="calculator">42 - 10</gadget>
<output>32</output>

<gadget id="calculator">14 - 32</gadget>
<output>-18</output>

<gadget id="calculator">28 + (-18)</gadget>
<output>10</output>

<result>10</result>