This question already has an answer here:

How many solutions (using only nonnegative integers) are there to the equation $$x_1+ x_2 + x_3 + x_4 + x_5 = 31\;?$$


marked as duplicate by Rory Daulton, choco_addicted, Daniel W. Farlow, Shahab, Leucippus Mar 31 '16 at 1:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Where did you come across this problem, and how would you approach solving it? $\endgroup$ – Mike Pierce Mar 30 '16 at 23:44
  • $\begingroup$ Please see Stars and Bars (combinatorics, Wikipedia) or the many answers on MSE that discuss Stars and Bars. $\endgroup$ – André Nicolas Mar 30 '16 at 23:45