Let x = the number of donuts Gamma took.

The total donuts Gamma and Beta have is 40 - 8 = <<40-8=32>>32 donuts.

3x is the number of donuts for Beta.

3x + x is the number of total donuts for Beta and Gamma.

If we add the two x terms, we get 4x = 32.

If we divide both sides by 4, we get x = 8, so Gamma has 8 donuts.

# Answer

8
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Delta, Beta and Gamma decided to share 40 donuts. Delta took 8 donuts and Beta took three times as many as Gamma. How many donuts did Gamma receive?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
8
Delta, Beta and Gamma decided to share 40 donuts. Delta took 8 donuts and Beta took three times as many as Gamma. How many donuts did Gamma receive?
train