How many nonnegative integer solutions of the following diophantine equations? And how to find them? \begin{equation} \left\{ \begin{aligned} x_1+x_2+\cdots+x_n=r\\ x_1+2x_2+\cdots+nx_n=n\\ \end{aligned} \right. \end{equation} where $1\leq r\leq n;r,n\in Z^+.$

I will appreciate it for any advices and suggestions! Thank you very much!