Camels and Bananas

The problem
3000 bananas Β· camel carries ≀ 1000 Β· 1 banana / mileSTARTπŸͺ3000 🍌ENDπŸ›οΈ? 🍌distance = 1000 mileshow many bananas arrive at the market?

A merchant has 3,000 bananas and one camel. Rules:

  • The camel carries at most 1,000 bananas at a time.
  • The camel eats 1 banana per mile walked, loaded or empty.
  • The market is 1,000 miles away.
  • The merchant may cache bananas at any point along the road.

How many bananas can the merchant deliver to the market?