maximum and minimum value of $(a+b)(b+c)(c+d)(d+e)(e+a).$ 
Let $a,b,c,d,e\geq  -1$ and $a+b+c+d+e=5.$ Find the maximum and minimum value of $S=(a+b)(b+c)(c+d)(d+e)(e+a).$

I couldn't proceed much, however I think I got the minimum and maximum case.
For minimum, we get $-512$ with equality on $(-1,-1,-1,-1,9).$
For maximum, we get $288$ with equality on   $(-1,-1,-1,4,4).$

This is the problem of China national in math olympiad here is my proof:
.
.
.
Wlog let $|e|=Max(|a|,|b|,|c|,|d|,|e|)$ so we have $(e+d)(e+a)>0$ (take note we are to find the min at first ) for it to be negative we have $2$ cases one is that all $3$ of $(b+c),(c+d),(a+b)$ are negative which we have from AM_GM that :
$$(-a-b)(-b-c)(-c-d)(d+e)(e+a)\le (\frac{-a-2b-2c-d}{3})^3(\frac{a+d+2e}{2})^2=(\frac{a+d+2e-10}{3})^3(\frac{a+d+2e}{2})^2 \le 512$$
so its done the second case is that only one of them is negative. Let $a+b$ be negative (the way we use AM_GM gives us this freedom to assume this) now we have
$$(-a-b)(b+c)(c+d)(d+e)(e+a)\le (\frac{2(c+d+e)}{5})^5=(\frac{2(5-a-b)}{5})^5\le(\frac{14}{5})^5<  512$$
so we are done here. now we want to find the Max which we do in the ofllowing way.
if all of $a+b,b+c,c+d$ are possitive we have from AM_GM that
$$S\le (\frac{2(a+b+c+d+e)}{5})^5=32<288.$$
the next case is the following . we have $a+b\le0$, $b+c\le0$, $c+d\ge0$,  then by AM_GM
$$(-a-b)(-b-c)(c+d)(d+e)(e+a)\le (\frac{-a-2b-c}{2})^2(\frac{c+d+e+a}{2})^2(d+e)=(\frac{d+e-b-5}{2})^2(\frac{5-b}{2})^2(d+e)\le 288$$
the last case is :
$a+b\le0$, $b+c\ge0$, $c+d\le0$, then by AM_GM we have
$$S=(-a-b)(b+c)(-c-d)(d+e)(e+a)\le (\frac{-a-b-c-d}{2})^2(\frac{b+c+d+e+e+a}{3})^3=(\frac{e-5}{2})^2(\frac{5+e}{3})^3< 288$$
and done done.
