Showing $x_n-x_nx_1+\sum_{k=1}^{n-1} (x_k-x_kx_{k+1})\leq\left\lfloor\frac{n}{2}\right\rfloor$, with $x_i\in[0,1]$ 
Let $x_1, x_2,\ldots, x_n$ be arbitrary numbers from the interval $[0,1]$ with $n>1$.
Show that $$x_n-x_nx_1+\sum_{k=1}^{n-1} (x_k-x_kx_{k+1})\leq\left\lfloor\frac{n}{2}\right\rfloor$$

I tried to factor out the $x_k$ from each term to show that if the coefficient $x_k$ of $x_k(1-x_{k+1})$ is larger than $\dfrac{1}{2}$, then the term $x_{k-1}(1-x_k)$ must be smaller than $\dfrac12$, but I don't know where to go from here or if it is even the right approach.

When $n$ is even, we have
\begin{align*}
 x_1(1-x_2) + x_2(1-x_3) 
 = 1 - (1 - x_1)(1 - x_2) - x_2 x_3 &\le 1,\\
 x_3(1-x_4) + x_4(1 - x_5) = 1 - (1-x_3)(1-x_4) - x_4x_5 &\le 1,\\
 \cdots \cdots \cdots \cdots &\qquad\\
 x_{n-1}(1 - x_n) + x_n(1 - x_1)
 = 1 - (1 - x_{n-1})(1 - x_n) - x_nx_1 &\le 1.
\end{align*}
Adding them up, the desired result follows.
When $n$ is odd, we split into two cases:
If $1 - x_1 - x_{n-1} \ge 0$, then
\begin{align*}
 x_2(1 - x_3) + x_3(1-x_4) = 1 - (1-x_2)(1-x_3) - x_3x_4 &\le 1, \\
 x_4(1-x_5) + x_5(1-x_6) = 1 - (1-x_4)(1-x_5) - x_5x_6 &\le 1,\\
  \cdots \cdots \cdots \cdots &\qquad\\
 x_{n-3}(1-x_{n-2}) + x_{n-2}(1-x_{n-1}) = 1 - (1-x_{n-3})(1-x_{n-2}) - x_{n-2}x_{n-1} &\le 1,
\end{align*}
and
\begin{align*}
 &x_{n-1}(1 - x_n) + x_n(1-x_1) + x_1(1-x_2)\\
 ={}& (1 - x_1 - x_{n-1})x_n + x_{n-1} + x_1(1-x_2)\\
 \le{}& (1-x_1-x_{n-1}) + x_{n-1} + x_1(1-x_2)\\
 ={}&1 - x_1x_2\\
 \le{}& 1. 
\end{align*}
Adding them up, the desired result follows.
If $1 - x_1 - x_{n-1} < 0$, then
\begin{align*}
 x_1(1-x_2) + x_2(1-x_3) 
 = 1 - (1 - x_1)(1 - x_2) - x_2 x_3 &\le 1,\\
 x_3(1-x_4) + x_4(1 - x_5) = 1 - (1-x_3)(1-x_4) - x_4x_5 &\le 1,\\
 \cdots \cdots \cdots \cdots &\qquad\\
 x_{n-4}(1 - x_{n-3}) + x_{n-3}(1 - x_{n-2})
 = 1 - (1 - x_{n-4})(1 - x_{n-3}) - x_{n-3}x_{n-2} &\le 1,
\end{align*}
and
\begin{align*}
 &x_{n-2}(1 - x_{n-1}) + x_{n-1}(1 - x_n) + x_n(1 - x_1)\\
 ={}& x_{n-2}(1 - x_{n-1}) + x_{n-1} + x_n( 1 - x_1 - x_{n-1})\\
 \le{}& x_{n-2}(1 - x_{n-1}) + x_{n-1} \\ 
 \le{}& (1 - x_{n-1}) + x_{n-1}\\
 ={}& 1.
\end{align*}
Adding them up, the desired result follows.
We are done.
