50 people from class 51 participated in the Chinese and mathematics competitions, 30 people participated in the Chinese competition, 38 people participated in the mathematics competition, 2 people did not participate in both subjects, how many people participated in both subjects.
五1班50人参加语文和数学竞赛，参加语文竞赛所有30人，参加数学竞赛的有38人，两科都不参加的有2人，两科都参加的有多少人．
<gadget id="calculator">50 - 2</gadget>
<output>48</output>

<gadget id="calculator">38 - 48</gadget>
<output>-10</output>

<gadget id="calculator">30 + (-10)</gadget>
<output>20</output>

<result>20</result>