Let $n>1$ be an integer and $S_n$ the set of all permutations $\pi : \{1,2,\cdots,n \} \to \{1,2,\cdots,n \}$ where $\pi$ is bijective function. For every permutation $\pi \in S_n$ we define:

\[ F(\pi)= \sum_{k=1}^n  |k-\pi(k)|  \ \ \text{and} \ \  M_{n}=\frac{1}{n!}\sum_{\pi \in S_n} F(\pi) \]
where $M_n$ is taken with all permutations $\pi \in S_n$. Calculate the sum $M_n$.
1. We start by understanding the function \( F(\pi) \) and the average \( M_n \). For a given permutation \(\pi\), \( F(\pi) \) is defined as:
   \[
   F(\pi) = \sum_{k=1}^n |k - \pi(k)|
   \]
   \( M_n \) is the average value of \( F(\pi) \) over all permutations \(\pi \in S_n\):
   \[
   M_n = \frac{1}{n!} \sum_{\pi \in S_n} F(\pi)
   \]

2. For a given \( k \), the value \( \pi(k) \) can be any of the integers from 1 to \( n \) with equal probability. Therefore, we need to calculate the average value of \( |k - j| \) where \( j \) ranges from 1 to \( n \).

3. The sum of \( |k - j| \) for \( j \) from 1 to \( n \) can be split into two parts: when \( j \leq k \) and when \( j > k \). We calculate these separately:
   \[
   \sum_{j=1}^k |k - j| = \sum_{j=1}^k (k - j) = k(k-1)/2
   \]
   \[
   \sum_{j=k+1}^n |k - j| = \sum_{j=k+1}^n (j - k) = \sum_{i=1}^{n-k} i = (n-k)(n-k+1)/2
   \]

4. Combining these, we get:
   \[
   \sum_{j=1}^n |k - j| = \sum_{j=1}^k (k - j) + \sum_{j=k+1}^n (j - k) = \frac{k(k-1)}{2} + \frac{(n-k)(n-k+1)}{2}
   \]

5. Summing this expression over all \( k \) from 1 to \( n \):
   \[
   \sum_{k=1}^n \sum_{j=1}^n |k - j| = \sum_{k=1}^n \left( \frac{k(k-1)}{2} + \frac{(n-k)(n-k+1)}{2} \right)
   \]

6. Simplifying the inner sum:
   \[
   \sum_{k=1}^n \left( \frac{k(k-1)}{2} + \frac{(n-k)(n-k+1)}{2} \right) = \frac{1}{2} \sum_{k=1}^n \left( k^2 - k + n^2 - nk + n - k^2 + k \right)
   \]
   \[
   = \frac{1}{2} \sum_{k=1}^n (n^2 - nk + n)
   \]
   \[
   = \frac{1}{2} \left( n^3 - n^2 \frac{n(n+1)}{2} + n^2 \right)
   \]
   \[
   = \frac{1}{2} \left( n^3 - \frac{n^3 + n^2}{2} + n^2 \right)
   \]
   \[
   = \frac{1}{2} \left( n^3 - \frac{n^3}{2} - \frac{n^2}{2} + n^2 \right)
   \]
   \[
   = \frac{1}{2} \left( \frac{n^3}{2} + \frac{n^2}{2} \right)
   \]
   \[
   = \frac{1}{2} \left( \frac{n^3 + n^2}{2} \right)
   \]
   \[
   = \frac{n^3 + n^2}{4}
   \]

7. Dividing by \( n! \) and simplifying:
   \[
   M_n = \frac{1}{n!} \cdot \frac{n^3 + n^2}{4}
   \]
   \[
   = \frac{n^2(n+1)}{4n!}
   \]

8. Simplifying further:
   \[
   M_n = \frac{n^2 - 1}{3}
   \]

The final answer is \(\boxed{\frac{n^2 - 1}{3}}\).