and there are 4 units of energy that need to be distributed among the particles (remember, everything is quantised, so these 4 units of energy can't be subdivided). If we put all of that energy into A, then you can count that there's 5 ways of doing so,
Temperature and the Sackur–Tetrode Equation