As Edward's birthday is coming, her dear sister Xiao is readying a present for him now. Xiao knows that Edward loves sugar. So she bought a plenty of sugar, and those sugar is in different flavors.
Xiao puts the sugars which have the same flavor into one box, she needs different box for different flavor sugars. The box she has is unlimited with value 2^i, which means she has boxes with volume 1, 2, 4, 8, and so on. After this, you wants to pack those boxes into larger boxes, until only one box remains. She can only pack two boxes at a time. That is, she can take any two boxes she currently has, get a new box, and put the two old boxes into the new box. This is possible if and only if the volume of the new box is greater than or equal to the sum of volumes of the two old boxes. She always get to choose which two boxes she wants to pack together, and how large the new box should be.