In a math competition, there were 24 questions in total, 5 points were awarded for each correct answer, 2 points were deducted for each incorrect answer, and Liu Ming received a total of 78 points. How many questions did he answer correctly?
一次数学竞赛中，共有24道题，做对一道得5分，不做或做错一道倒扣2分，刘明共得78分，他做对了几道题？
<gadget id="calculator">24 * 5</gadget>
<output>120</output>

<gadget id="calculator">120 - 78</gadget>
<output>42</output>

<gadget id="calculator">5 + 2</gadget>
<output>7</output>

<gadget id="calculator">42 / 7</gadget>
<output>6</output>

<gadget id="calculator">24 - 6</gadget>
<output>18</output>

<result>18</result>