Let $n$ be a positive integer and let $k_{1}, k_{2}, k_{3}, \ldots, k_{n}$ be any permutation of the integers from 1 to $n$. What is the maximum value of the $n$-term expression

$$
\left(1-k_{1}\right)^{2}+\left(2-k_{2}\right)^{2}+\left(3-k_{3}\right)^{2}+\ldots+\left(n-k_{n}\right)^{2}
$$