A farmer walked into the cattle market and found the price is fixed at "5 for 2 coins", either buy or sell. He thought a little and then bought cattle of 250 cows for 100 coins (250/5 * 2).
Then sold a part of cattle at the "5 for 2 coins" rule for 100 coins and takes the remainder of cattle as his profit.
How did he achieve this?
P.S: There is a chance another version of this question already asked.
Hint:
The cows are not the same size.
Edit: The farmer sold the cattle at the same day.