In a math test among 40 students in a certain class, 23 people got the first question right, 27 people got the second question right, and 17 got both questions right. How many students got both questions right?
某班40位同学在一次数学测验中，答对第一题的有23人，答对第二题的有27人，两题都答对的有17人，问有几个同学两题都不对？
<gadget id="calculator">27 - 17</gadget>
<output>10</output>

<gadget id="calculator">23 + 10</gadget>
<output>33</output>

<gadget id="calculator">40 - 33</gadget>
<output>7</output>

<result>7</result>