How many ways can you collect six dollars from $8$ people if $6$ people give $0$ or $1$ dollars and $2$ people each give $0$, $1$, or $5$ dollars? I must use a generating function to solve this question: 

In how many ways can you collect six dollars from eight people if six people give either $0$ or $1$ dollars and the other two people each give $0$, $1$, or $5$ dollars?

Here is what I have so far.

The generating function is $(1+x)^6(1+x+x^5)^2$. Then let $f(x)= (1+x)^6$, and $g(x) = (1+x+x^5)^2$. We want the coefficient of $x^6$. Then, we note f(x) has the expansion:

$(1+x)^6$ = $1$ + $6 \choose 1$$x$ + $6 \choose 2$$x^2$ + ... + $6 \choose 6$$x^6$

But here is where I get stuck. We can let $h(x) = f(x)g(x)$ where $a_0b_0 + (a_1b_0+a_0b_1)x + (a_2b_0+ a_1b_1 + a_0b_2)x^2 + ... + (a_rb_0+ a_{r-1}b_1 + a_{r-2}b_2 + ... + a_0b_r)x^r$,

But I can't figure out the expansion of $g(x) = $$(1+x+x^5)^2$.

Can someone help me find the expansion of $g(x)$, and help me solve the problem?
In general,
$$
(a+b+c)^2=a^2+b^2+c^2+2(ab+bc+ca).
$$
Thus
\begin{align}
(1+x+x^5)^2&amp;=1+x^2+x^{10}+2(x+x^6+x^5)\\
&amp;=1+2x+x^2+2x^5+2x^6+2x^{10}
\end{align}
and so the coefficient of $x^6$ is
\begin{align}
\binom{6}{6}+2\binom{6}{5}+\binom{6}{4}+2\binom{6}{1}+\binom{6}{0}&amp;=1+2\cdot 6+15+ 2\cdot 6+1\\
&amp;=41.
\end{align}
Hint its multinomial theorem where $n=x_1+x_2+...x_n$ and coefficient is given by ${n\choose x_1,x_2,x_3..x_n}$