Now, consider the case where there is more than one way to put N i particles in the box i (i.e. taking the degeneracy problem into consideration). If the i -th box has a "degeneracy" of g i , that is, it has g i "sub-boxes" ( g i boxes with the same energy ε ε i . These states/boxes with the same energy are called degenerate states.), such that any way of filling the i -th box where the number in the sub-boxes is changed is a distinct way of filling the box, then the number of ways of filling the i -th box must be increased by the number of ways of distributing the N i objects in the g i "sub-boxes". The number of ways of placing N i distinguishable objects in g i "sub-boxes" is g i N i (the first object can go into any of the g i boxes, the second object can also go into any of the g i boxes, and so on). Thus the number of ways W that a total of N particles can be classified into energy levels according to their energies, while each level i having g i distinct states such that the i -th level accommodates N i particles is: