I just don't get what the problem states.

Are there B large boxes, and for a large box, K-1 intermediate boxes in each of them, and a_i smallest boxes in each of the intermediate boxes?
So are there three kinds of boxes? And how can I figure out whether a large box or an intermediate box contains chocolates or not?
Any help will be appreciated..

Regards,
JongMan