Question 174899
Well, it's clear that Loki the Llama cannot make the 1000-mile journey to the market place in one trip because she would end up mango-less (it would be fruitless!).
Nor could she even go more than half way if she is to return to the source of her mangos.
So, clearly, she must set up caches of mangos on her way to market so that she can get some of the mangos to market.
Here's one approach:
Start with a full load (1000 mangos), go 250 miles (eat 250 mangos in the process), deposit 500 mangos in the first cache and return (eat 250 more mangos) to the source. This will take care of the first 1000 mangos. (1000-250-500-250 = 0)
Second trip, start with a full load (1000 mangos), go 250 miles to the first cache, pick up 250 mangos to replace the 250 eaten (now Loki has a full load again), and go 250 miles more to the second cache.  Deposit 500 mangos in the second cache and return to the first cache to pick up the remaining 250 mangos and return to the source. (1000-250+250-250-500-250+250-250 = 0)
Third trip, pick up the remaining 1000 mangos, go 500 miles to the second cache, pick up the 500 mangos there to replace those eaten (now Loki has a full load of 1000 mangos), and proceed the remaining 500 miles to the market place with 500 mangos remaining for sale. (1000-500+500-500 = 500).