
A truck driver has been tasked with transporting 3000 apples between towns A and B, which are 1000 miles apart. However, while there are apples in his truck, the truck driver will eat them at a rate of 1 apple per mile. If there are no apples he drives without eating. The truck has a maximum capacity of 1000 apples at any one time. The driver may deposit apples at any point between A and B.
Question: How can he get the maximum possible number of apples from town A to town B?