The school organized students to visit the tombs of the martyrs. There were 82 people from the middle grades, and 20 people from the senior grades were 3 times more than the middle grades. How many people from the middle and senior grades went there?
学校组织同学祭扫烈士墓，中年级去了82人，高年级去的人数比中年级的3倍多20人，中、高年级一共去了多少人？
<gadget id="calculator">82 * 3</gadget>
<output>246</output>

<gadget id="calculator">246 + 20 + 82</gadget>
<output>348</output>

<result>348</result>