candies and stock maximize