From a bag containing candies, Alice receives candies whether Alice or Bob opens it.
The only difference is the extra candy when is odd. Alice receives that candy exactly when she opens the bag.
Therefore, her total is a fixed contribution , plus the number of odd-sized bags she opens.
This explains why choosing the largest bags is not the right goal: opening an even-sized bag gives Alice no advantage, while opening any odd-sized bag gives her exactly one extra candy.