The fourth, fifth, and sixth grades of Qingshan Primary School carried out tree planting work. Among them, 39 trees were not planted in the fifth grade, and 42 were not planted in the fourth grade. Now we know that there are 31 trees planted in the fourth and fifth grades. How many trees were planted in the sixth grade? ．
青山小学四、五、六年级开展植树劳动，其中有39棵不是五年级种的，有42棵不是四年级种的，现在知道四、五年级共种树31棵，那么六年级种了多少棵．
<gadget id="calculator">42 - 31</gadget>
<output>11</output>

<gadget id="calculator">39 + 11</gadget>
<output>50</output>

<gadget id="calculator">50 / 2</gadget>
<output>25</output>

<result>25</result>