In the mid-term exam of Class 1 of Level 6, 31 people got good grades in Chinese, 28 people got good grades in mathematics, 10 people got good grades in all known Chinese, and 2 people got good grades in all Chinese. How many people are there in the class?
六级1班期中考试，语文获优良成绩的有31人，数学获优良成绩有28人，已知语数都获优良成绩的有10人，语数都末获优良成绩的有2人，这个班全班有多少人．
<gadget id="calculator">28 - 10</gadget>
<output>18</output>

<gadget id="calculator">31 + 18 + 2</gadget>
<output>51</output>

<result>51</result>