In Fred the Farmer's barn, there were 100 horses, 29 sheep, and 9 chickens. Brian bought half of the animals and sold them at the market. Jeremy then gifted Fred an additional 37 goats. If exactly half of the animals in the barn are male animals, how many male animals are there in the barn? Let's think step by step and output the final answer after "####".
user
Fred's barn started with 100 + 29 + 9 = <<100+29+9=138>>138 animals.
Brian bought half of these, so there were 138 / 2 = <<138/2=69>>69 remaining.
After Jeremy gifted Fred 37 goats, there were 69 + 37 = <<69+37=106>>106 animals in the barn.
So, 106 / 2 = <<106/2=53>>53 of these animals are male.
#### 53
In Fred the Farmer's barn, there were 100 horses, 29 sheep, and 9 chickens. Brian bought half of the animals and sold them at the market. Jeremy then gifted Fred an additional 37 goats. If exactly half of the animals in the barn are male animals, how many male animals are there in the barn?
train