To find number of ways of solving $x + y + z = 12$, with $0 \leq x, y, z \leq 6$, using generating functions I am learning generating functions so I tried to solve the below question using generating functions.
Number of ways in which value of three variables add up to 12.
$x + y + z = 12$ and  $0 \leq x,y,z \leq 6$.
To solve this question, we can form a generating functions as :
$$(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)^3$$ and find the coefficient of $x^{12}$.
The above function can be written as:
$$\left(\frac{1-x^7}{1-x}\right)^3$$ 
How do I find coefficient of $x^{12}$ in the above expression?

You can write $\displaystyle\left(\frac{1-x^7}{1-x}\right)^3=(1-x^7)^3(1-x)^{-3}=(1-3x^7+3x^{14}-x^{21})\sum_{n=0}^{\infty}\binom{n+2}{2}x^n,$
so the coefficient of $x^{12}$ is given by $\displaystyle\binom{14}{2}-3\binom{7}{2}=28.$
