>>37962478I start with $800.
I buy a cow for $800. I have $0 now.
I sell the cow for $1000. My total profit right now is $1000-800 = $200.
I buy the cow again, but this time it's $1100. The extra $100 are paid out of the profit I made on the first sale, so my total profit is now $100.
I sell the cow for $1300. My profit on this sale is $1300-$1100 = $200, but I have $100 profit left over from the previous sale, so my total profit is $300.