12 people from class 31 participated in the school's art interest group, and 15 people participated in the school's music interest group. Among them, 5 people participated in both groups. How many people participated in the art and music interest groups?
三1班有12人参加了学校的美术兴趣小组，有15人参加了学校的音乐兴趣，其中这两个小组都参加的有5人，请问参加美术和音乐兴趣小组的一共有多少人？
<gadget id="calculator">15 - 5</gadget>
<output>10</output>

<gadget id="calculator">12 + 10</gadget>
<output>22</output>

<result>22</result>