There are 35 people in Class 3, and many students participated in extracurricular groups. There are 20 people in the art group, 22 people in the martial arts group, and 6 people in neither group. How many people participated in both the art group and the martial arts group?
3班有35人，许多同学参加了课外小组．参加美术组的有20人，参加武术组的有22人，两个组都没有参加的有6人．既参加美术组又参加武术组的有多少人？
<gadget id="calculator">20 + 22</gadget>
<output>42</output>

<gadget id="calculator">35 - 6</gadget>
<output>29</output>

<gadget id="calculator">42 - 29</gadget>
<output>13</output>

<result>13</result>