What is the largest possible value of $|a_1 - 1| + |a_2-2|+...+ |a_n- n|$ where $a_1, a_2,..., a_n$ is a permutation of $1,2,..., n$?
To find the largest possible value of \( |a_1 - 1| + |a_2 - 2| + \cdots + |a_n - n| \) where \( a_1, a_2, \ldots, a_n \) is a permutation of \( 1, 2, \ldots, n \), we need to consider the nature of the absolute value function and how it behaves with permutations.

1. **Understanding the Absolute Value Function:**
   The absolute value function \( |x - y| \) measures the distance between \( x \) and \( y \). For a permutation \( a_1, a_2, \ldots, a_n \) of \( 1, 2, \ldots, n \), we want to maximize the sum of these distances.

2. **Maximizing Individual Terms:**
   To maximize \( |a_i - i| \), we should aim to make \( a_i \) as different from \( i \) as possible. The maximum value of \( |a_i - i| \) occurs when \( a_i \) is either \( 1 \) or \( n \) (the furthest values from \( i \)).

3. **Constructing the Permutation:**
   Consider the permutation that alternates between the largest and smallest remaining values. For example, for \( n = 4 \), the permutation \( 4, 1, 3, 2 \) maximizes the sum:
   \[
   |4 - 1| + |1 - 2| + |3 - 3| + |2 - 4| = 3 + 1 + 0 + 2 = 6
   \]

4. **Generalizing the Pattern:**
   For a general \( n \), the permutation that alternates between the largest and smallest remaining values will maximize the sum. This can be formalized as:
   \[
   a_i = \begin{cases} 
   n - \left\lfloor \frac{i-1}{2} \right\rfloor & \text{if } i \text{ is odd} \\
   1 + \left\lfloor \frac{i-1}{2} \right\rfloor & \text{if } i \text{ is even}
   \end{cases}
   \]

5. **Calculating the Maximum Sum:**
   The maximum sum can be calculated by summing the distances for this permutation. For each \( i \), the distance \( |a_i - i| \) will be maximized by the above construction. The sum of these distances is:
   \[
   \sum_{i=1}^n |a_i - i|
   \]

6. **Summing the Distances:**
   The sum of the distances for the optimal permutation can be shown to be:
   \[
   \sum_{i=1}^n |a_i - i| = \left\lfloor \frac{n^2}{2} \right\rfloor
   \]
   This is because each pair of terms \( (a_i, a_{i+1}) \) contributes approximately \( n \) to the sum, and there are \( \frac{n}{2} \) such pairs.

The final answer is \( \boxed{\left\lfloor \frac{n^2}{2} \right\rfloor} \).