So we have
$$
\left\{ \begin{gathered}
0 \leqslant R \leqslant \left( {2n + 1} \right)N \hfill \\
0 \leqslant r_{\,i} \leqslant \min (N,R) \hfill \\
r_{\,1} + r_{\,2} + \cdots + r_{\,2n + 1} = R \hfill \\
\end{gathered} \right.
$$
understanding (from the context) that the $r_i$ are integers.
The formulation that you give for the bounds is quite peculiar, since from it we get
$$
r_{\,\text{avg}} = \frac{R}
{{2n + 1}} \leqslant N\quad \quad M = \min (N,R) = \left\{ {\begin{array}{*{20}c}
N & {\left| {\;\frac{R}
{{2n + 1}} \leqslant N \leqslant R} \right.} \\
R & {\left| {\;R \leqslant N} \right.} \\
\end{array} } \right.
$$
Now, if the variables are upper limited to $M=N$, then the average will definitely be not greater than $N$,
while if $M=R$, then the upper bound is implied by the sum.
In any case, your question turns down to finding (apart the change in denominating the parameters)
$$N_{\,b} (s,r,m) = \text{No}\text{. of solutions to}\;\left\{ \begin{gathered}
0 \leqslant \text{integer }x_{\,j} \leqslant r \hfill \\
x_{\,1} + x_{\,2} + \cdots + x_{\,m} = s \hfill \\
\end{gathered} \right.$$
where $N_{\,b} (s,r,m)$ is given by the closed summation
$$
N_b (s,r,m)\quad \left| {\;0 \leqslant \text{integers }s,m,r} \right.\quad = \sum\limits_{\left( {0\, \leqslant } \right)\,\,k\,\,\left( { \leqslant \,\frac{s}
{r}\, \leqslant \,m} \right)} {\left( { - 1} \right)^k \left( \begin{gathered}
m \hfill \\
k \hfill \\
\end{gathered} \right)\left( \begin{gathered}
s + m - 1 - k\left( {r + 1} \right) \\
s - k\left( {r + 1} \right) \\
\end{gathered} \right)}
$$
as explained in this post and in in this other one.