What is the number of ways to put 40 identical balls in 6 boxes while no box contains more than 14 balls. I believe that I have to use the Inclusion–exclusion principle but I am not sure how. I tried to use this formula: $\binom{n+k-1}{n-1}$ for every step of the inclusion–exclusion solution but it didn't work out. 
Thank you!!

Inclusion exclusion.
Include all of the ways to allocate 40 balls among the 6 boxed without restriction.
Exclude the cases that one box holds more than 14 balls... 
choose one box (how many ways can you do this?)  Put 15 balls in that box.  How many ways to allocate the remaining 25 balls (with the possibility that there are more than 15 balls in the over-filled box.)
Now you have double counted cases where two boxes have more than 14 balls.  Include those boxes.
Choose 2 boxes, put 15 balls in each.  Count the number of ways to allocate the rest.
${45\choose 5} - {6\choose 1}{30\choose 5} + {6\choose 2}{15\choose 5}$
