Let $x_1, x_2, \dots, x_n$ be n real numbers in the closed interval [0,1]. Show that there exists $x \in [0,1]$ such that
$\frac{1}{n}\sum_{i+1}^{n}|x-x_i|=\frac{1}{2}.$