There are 28 people from class 31 who participated in the mathematics competition, 26 people who participated in the composition competition, 10 people who participated in both items, and 2 people who did not participate in both items. How many people are there in this class?
三1班参加数学竞赛的有28人，参加作文竞赛的26人，两项都参加的有10人，两项都没有参加的有2人．这个班共有多少人．
<gadget id="calculator">26 - 10</gadget>
<output>16</output>

<gadget id="calculator">28 + 16 + 2</gadget>
<output>46</output>

<result>46</result>