Find the minimal value of $\sum\limits_{n=1}^8|x-n|$ 
Find the minimum value of $( |x-1|+|x-2|...+|x-8|) $

My attempt
Using triangle inequality i.e. 
$|x-y|≤|x|+|y|$ $|x-1|=|x-1-0|≤|x-1|+0$ $|x-2|=|x-1-1|≤|x-1|+1$ $|x-3| =|x-1-2| ≤|x-1|+2$
... 
...
...
$|x-8| =|x-1-7| ≤|x-1|+7$
Adding all these inequalities, $( |x-1|+|x-2|...+|x-8|) $$≤$  $8|x-1| + 28$ Clearly the minimum value is 28 at x=1. The answer is wrong. Also it is intuitive that the x must lie somewhere in between 1 to 8 so that the sum of the distances of x from each number is the least.
What am I doing wrong? How else to approach this question. Are there any other ways? 

The graph of the function is composed of several joining line segments. The leftmost is for the interval $(-\infty, 1]$, the next line segment is for the interval $[1,2]$,...,the rightmost line segment is for the interval $[8,\infty)$. This is because for $n\in\mathbb{R} $, $x\in[k, k+1]$, $|x-n|$ is either $x-n$ or $~x+n$ in the whole interval. $f(x) $ as a sum of them is a line segment. It is easy to see that $f$ is continuous by considering the left hand and right hand limits of it at integral points. 
The slope for the line segment for the interval $[4,5]$ is $0$ and it is where the function attains its minimum. 

Take $x=4$. The minimum value is $3+2+1+0+1+2+3+4=16$.
