Hint: The integral $\int f $ is nothing but the sum $\sum_{i_1=r,\dots,i_n=r}^{i_1=s,\dots,i_n=s} (i_1+i_n)=(s-r)^{n-1} (s+r)(s-r+1)$.
EDIT: More explicitly
$$\int f = \int ([x_1] +[x_n]) \chi ([a,b])= ??$$
Let us take the special case $n=2$ then in this case
\begin{eqnarray*}
\int f & = & \int_{[a,b]} [x_1]+[x_2] =\int_{[a,b]} [x_1] + \int_{[a,b]} [x_2]=\int_{[r,s]}\int_{[r,s]} [x_1] +\int_{r,s]}\int_{[r,s]}[x_2] \\
& = & (s-r)\sum_{r\leq i \leq s} i + (s-r) \sum_{r \leq j \leq s} j= (s-r) (s+r) (s-r+1)
\end{eqnarray*}
because $S=\sum_{r \leq i \leq s} i= r+ (r+1) + \dots +s =s+ (s-1) + \dots +r$ where we just reversed the order of addition in the last equality hence by adding $S+S$ we get $2S= (r+s) + (r+1+s-1) +\dots =(r+s)+(r+s) + \dots + (r+s)= (s-r+1)(r+s)$ because $(r+s)$ was repeated $s-r+1$ times in the sum hence $S=\frac{(s-r+1)(s+r)}{2}$.