Chip and Dale play the following game. Chip starts by splitting $1001$ nuts between three piles, so Dale can see it. In response, Dale chooses some number $N$ from $1$ to $1001$. Then Chip moves nuts from the piles he prepared to a new (fourth) pile until there will be exactly $N$ nuts in any one or more piles. When Chip accomplishes his task, Dale gets an exact amount of nuts that Chip moved. What is the maximal number of nuts that Dale can get for sure, no matter how Chip acts? (Naturally, Dale wants to get as many nuts as possible, while Chip wants to lose as little as possible).