The 5th graders planted 30 x 2 = <<30*2=60>>60 trees.

Thrice the number of trees planted by the 5th graders is 60 x 3 = <<60*3=180>>180.

So, the 6th graders planted 180 - 30 = <<180-30=150>>150 trees.

Therefore, they planted a total of 30 + 60 + 150 = <<30+60+150=240>>240 trees.

# Answer

240
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
A school does a yearly tree planting activity. This year, the 4th graders planted a total of 30 trees while 5th graders planted twice as many. The 6th graders planted 30 fewer than thrice the number of trees planted by the 5th graders. How many trees did they plant altogether?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
240
A school does a yearly tree planting activity. This year, the 4th graders planted a total of 30 trees while 5th graders planted twice as many. The 6th graders planted 30 fewer than thrice the number of trees planted by the 5th graders. How many trees did they plant altogether?
train