Let $n \geq 2$ be an integer. Lucia chooses $n$ real numbers $x_1,x_2,\ldots,x_n$ such that $\left| x_i-x_j \right|\geq 1$ for all $i\neq j$. Then, in each cell of an $n \times n$ grid, she writes one of these numbers, in such a way that no number is repeated in the same row or column. Finally, for each cell, she calculates the absolute value of the difference between the number in the cell and the number in the first cell of its same row. Determine the smallest value that the sum of the $n^2$ numbers that Lucia calculated can take.