Question based on inequality with $\sum_{i=1}^{n}x_{i}=1$ Question:

If  $n$ be given positive integer,let $x_{i}\ge 0$ such that $x_{1}+x_{2}+\cdots+x_{n}=1$. Find the maximum of the value $$x_{1}+x_{1}x_{2}+x_{1}x_{2}x_{3}+\cdots+x_{1}x_{2}x_{3}x_{4}\cdots x_{n}.$$

Try: (1):when $n=1$,it is clear equal $1$.
(2):when $n=2$, the condtion is $x_{1}+x_{2}=1$, then
$$x_{1}+x_{1}x_{2}=x_{1}+x_{1}(1-x_{1})=2x_{1}-x^2_{1}=-(x_{1}-1)^2+1\le 1$$
when $n=3$,the condtion $x_{1}+x_{2}+x_{3}=1$,then
$$x_{1}+x_{1}x_{2}+x_{1}x_{2}x_{3}=x_{1}(1+x_{2}+x_{2}x_{3})\le x_{1}(1+x_{2})(1+x_{3})\le \left(\dfrac{x_{1}+1+x_{2}+x_{3}+1}{3}\right)^3=1$$
when $x_{1}=1,x_{2}=x_{3}=0$
For $n\ge 4$,How find it ?

By AM-GM we obtain:
$$x_{1}+x_{1}x_{2}+x_{1}x_{2}x_{3}+\cdots+x_{1}x_{2}x_{3}x_{4}\cdots x_{n}$$
$$\leq x_1(1+x_2)\cdots(1+x_n)\leq\left(\frac{n-1+x_1+\cdots+x_n}{n}\right)^n=1.$$
The equality occurs for $x_2=\cdots=x_n=0$ and $x_1=1$, which says that $1$ is a maximal value.
