Dividing balls into boxes with capacity limits Problem:
In how many ways can you divide $13$ identical balls into $3$ different boxes
$k_1$, $k_2$, $k_3$, such that $k_1$ contains no more than $5$ balls, $k_2$ contains no more than $6$ balls and $k_3$ contains no more than $4$ balls?
My idea: 
So my idea is to use the following theorem:
"There are $C(n+r-1,r)$ r-combinations from a set with $n$ elements when repetition of elements is allowed." But I'm not sure.
Any great hints would be appreciated.

The answer can simply be given using generating functions. We simply need to calculate the coefficient of $x^{13}$in the expansion of $$(1+x+x^2+x^3+x^4)(1+x+x^2+x^3+x^4+x^5)(1+x+x^2+x^3+x^6)$$
$$=\frac {(1-x^5)}{(1-x)}\cdot  \frac {(1-x^6)}{(1-x)}\cdot  \frac {(1-x^7)}{(1-x)}$$
$$=\frac {1-x^5-x^6-x^7+x^{11}+x^{13}+x^{12}-x^{18}}{(1-x)^3}$$
Hence the answer simply goes as $$\binom {15}{13} -\binom {10}{8}- \binom {9}{7}-\binom {8}{6}+\binom {4}{2}+1+\binom {3}{1}=6$$
