In how many ways can we put $20$ balls into $5$ boxes A, B, C, D, E so that A has at most $3$ balls and B at most $2$ balls?
$$$$
If we had at least instead of at most we would put the minimum number of balls into these boxes and distribute the remaining balls into the 5 boxes. But what do we have to do now where we have at most ?
If these are indistinguishable balls then you can use the generating function $$\frac{(1+x+x^2+x^3)(1+x+x^2)}{(1-x)^3}$$ and look at the coefficient of $x^{20}$ in the expansion, which is $${22 \choose 2}+2{21 \choose 2}+3{20 \choose 2}+3{19 \choose 2}+2{18 \choose 2}+{17 \choose 2} = 2176$$