There are 56 students in a class, 28 students participated in the Chinese competition, and 27 students participated in the mathematics competition. If there are 25 students who did not participate in the two subjects, how many people participated in the Chinese and mathematics competitions at the same time?
某班有56人，参加语文竞赛的有28人，参加数学竞赛的有27人，如果两科都没有参加的有25人，那么同时参加语文、数学两科竞赛的有多少人．
<gadget id="calculator">56 - 25</gadget>
<output>31</output>

<gadget id="calculator">27 - 31</gadget>
<output>-4</output>

<gadget id="calculator">28 + (-4)</gadget>
<output>24</output>

<result>24</result>