Let $n\geq2$ be a positive integer. Determine all possible values of the sum
\[ S=\left\lfloor x_{2}-x_{1}\right\rfloor +\left\lfloor x_{3}-x_{2}\right\rfloor+...+\left\lfloor x_{n}-x_{n-1}\right\rfloor \]
 where $x_i\in \mathbb{R}$ satisfying $\lfloor{x_i}\rfloor=i$ for $i=1,2,\ldots n$.