During the school's afforestation activities, the fifth grade planted 500 trees, 160 more than the fourth grade. The sum of the number of trees planted in the fourth and fifth grades was exactly three times that of the third grade. How many trees were planted in the third grade?
学校开展植树造林活动中，五年级植了500棵树，比四年级多植160棵，四、五年级植树棵数的总和正好是三年级的3倍，三年级植了多少棵树？
<gadget id="calculator">500 - 160</gadget>
<output>340</output>

<gadget id="calculator">340 + 500</gadget>
<output>840</output>

<gadget id="calculator">840 / 3</gadget>
<output>280</output>

<result>280</result>