A canteen bought a batch of rice, ate 180 kilograms, and the rest was 40 kilograms less than twice the amount eaten, how many kilograms of rice did the canteen buy?
某食堂买来一批米，吃去180千克，剩下的比吃去的2倍少40千克，食堂买来多少千克米？
<gadget id="calculator">180 * 2</gadget>
<output>360</output>

<gadget id="calculator">360 - 40</gadget>
<output>320</output>

<gadget id="calculator">180 + 320</gadget>
<output>500</output>

<result>500</result>