There are 40 students in the third grade, and there are 5 fewer students in the fourth grade than three times the number of students in the third grade. How many students are there in the third and fourth grades?
三年级有40个学生，四年级学生比三年级人数的3倍少5人，三、四年级共有多少人？
<gadget id="calculator">40 * 3</gadget>
<output>120</output>

<gadget id="calculator">120 - 5</gadget>
<output>115</output>

<gadget id="calculator">115 + 40</gadget>
<output>155</output>

<result>155</result>