$$x_1 + x_2 + x_3 + x_4 + x_5 = 50$$ $50$ balls, $5$ bins: ${50 + 5 - 1 \choose 5 - 1}$ $$x_1 + x_2 + x_3 + x_4 + x_5 \leq 50$$ $\sum_1^5 x_i = n$ with excess of $50-n$ which we can place in an extra bin: $50$ balls, $6$ bins: ${50 + 6 - 1 \choose 6 - 1}$ $$x_1 + x_2 + x_3 + x_4 + x_5 = 50$$ $$\text{st } (\forall i \in [5])(x_i \geq 1)$$ Distribute $5$ beforehand, leaving $45$ balls still to be distributed: ${45 + 5 - 1 \choose 5 - 1}$ $$x_1 + x_2 + x_3 + x_4 + x_5 = 50$$ $$\text{st } (\forall i \in [5])(x_i \geq i)$$ Distribute $1,\dots,5$ beforehand, leaving $50-\sum_1^5i = 35$ balls still to be distributed: ${35 + 5 - 1 \choose 5 - 1}$ $$x_1 + x_2 + x_3 + x_4 + x_5 = 50$$ $$\text{st } (\exists \gamma \in [50])(x_1 \leq \gamma)$$ This is the very first case, excluding those when $x_1 > \gamma$. That is, when we have $50 - \gamma$ left to distribute. Thus we can take our first case and pattern-match with the prior case: ${50 + 5 - 1 \choose 5 - 1} - {(50-\gamma) + 5 - 1 \choose 5 - 1}$