In a primary school, the ratio of the number of upper grades to lower grades is 7:4, the lower grades are 54 more than the middle grades, and the upper grades are 270 more than the lower grades. How many people are there in total?
某小学高年级与低年级人数比7：4，低年级比中年级的75%还多54人，高年级比低年级多270人，问一共多少人？
<gadget id="calculator">7 - 4</gadget>
<output>3</output>

<gadget id="calculator">270 / 3</gadget>
<output>90</output>

<gadget id="calculator">90 * 7</gadget>
<output>630</output>

<gadget id="calculator">90 * 4</gadget>
<output>360</output>

<gadget id="calculator">360 - 54</gadget>
<output>306</output>

<gadget id="calculator">75 / 100</gadget>
<output>3/4 = around 0.75</output>

<gadget id="calculator">306 / (3/4)</gadget>
<output>408</output>

<gadget id="calculator">630 + 360 + 408</gadget>
<output>1_398</output>

<result>1_398</result>