The farmer has 51+5 = <<51+5=56>>56 cows in its herd.

The farmer sells 56/4 = <<56/4=14>>14 cows of the herd.

The farmer now has 56-14 = <<56-14=42>>42 cows.

# Answer

42
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
A farmer has 51 cows. The farmer adds five new cows to its herd and then sells a quarter of the herd. How many cows does the farmer have left?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
42
A farmer has 51 cows. The farmer adds five new cows to its herd and then sells a quarter of the herd. How many cows does the farmer have left?
train