Load Balancing bronze

I am trying to solve the following problem: USACO. However, my solution doesn’t seem to work. My solution goes like this:
I divide the number of cows by 4, which tells me how many cows will go in each of the 4 regions. I then check if number of cows modulo 4 is not 0. If it isn’t 0 I add one more to the output.

I’m a newbie so if you need more information or code tell me.

Ok, say you had 4 cows that have the following positions:
(1, 3)
(3, 3)
(5, 3)
(7, 3)
By your code’s logic, you could give each cow their own field. However, this isn’t actually the case.