The factory planned to use 340 tons of coal for the whole year, but in the first half of the year it used 145.8 tons of coal, and in the second half of the year it used 2.7 tons less than the first half of the year. How many tons of coal did it actually save compared to the plan?
工厂计划全年用煤340吨，结果上半年用煤145.8吨，下半年比上半年少用2.7吨，实际比计划节约用煤多少吨？
<gadget id="calculator">145.8 - 2.7</gadget>
<output>143.1</output>

<gadget id="calculator">143.1 + 145.8</gadget>
<output>288.9</output>

<gadget id="calculator">340 - 288.9</gadget>
<output>51.1</output>

<result>51.1</result>