Maybe I am misunderstanding the question :/
If you fill up all the little boxes first that is 5*10=50b***s
there are 49 b***s left to go into the big boxes
49/8 = 6 full boxes plus one ball left over
So that is 10 little boxes full and 6 big ones full = 16 full boxes