18 sixth-grade students participated in the math competition, 22 participated in the composition competition, and 14 participated in both competitions. How many people participated in the composition and mathematics competitions in the sixth grade?
六年级学生参加数学竞赛的有18人，参加作文竞赛的有22人，有14人两项竞赛都参加了．六年级参加作文和数学竞赛的一共有多少人．
<gadget id="calculator">22 - 14</gadget>
<output>8</output>

<gadget id="calculator">18 + 8</gadget>
<output>26</output>

<result>26</result>