human
A farmer has twice as many pigs as cows, and 4 more cows than goats. If the farmer has 56 animals total, how many goats does he have?
assistant
Define a variable ** Let x be the number of goats
How many cows does the farmer have? ** Cows:4+x
How many pigs does the farmer have? ** Pigs:2(4+x)=8+2x
Write an equation ** Total:x+4+x+8+2x=56
Combine like terms ** 4x+12=56
Subtract 12 ** 4x=44
Divide by 4 ** x=<<11=11>>11 goats
#### 11