The train has 6 carriages. There are 123 people in the first two sections, 56 people in the third section, 24 more people in the fourth section than the third section, and 78 people in the remaining two sections. How many people are there in the train?
火车有6节车箱，前两节一共有123人，第三节有56人，第四节比第三节多24人，剩下的两节有78人，请问火车一共有多少人？
<gadget id="calculator">56 + 24</gadget>
<output>80</output>

<gadget id="calculator">123 + 56 + 80 + 78</gadget>
<output>337</output>

<result>337</result>