What is the number of non-negative integral solutions of the equation $x_1+ \cdots +x_n=d,$ where $0 \leq x_i \leq e_i$ for all $i=1,\ldots ,n$ for some positive integers $e_i.$
Without the upper bound of the indeterminates I know how to calculate it, infact in that case the answer is $n+d-1 \choose d$. I need some help to prove it. Thanks.