There are 48 students in Class 1 of the fourth grade who took the Chinese and mathematics exams, and each of them achieved excellent results in at least one homework. Among them, 38 people had excellent Chinese scores, 40 people had excellent math scores, and 40 people had excellent scores in both Chinese and mathematics. how many people?
四年级一班有48人参加语文、数学考试，每人至少有一门功课取得了优异的成绩，其中语文成绩优秀的有38人，数学成绩优秀的有40人，语文、数学成绩都优秀的有多少人？
<gadget id="calculator">40 - 48</gadget>
<output>-8</output>

<gadget id="calculator">38 + (-8)</gadget>
<output>30</output>

<result>30</result>