4. (7 points) The numbers $a, b, c, d$ belong to the interval $[-5 ; 5]$. Find the maximum value of the expression $a+2 b+c+2 d-a b-b c-c d-d a$.
Answer: 110

Solution: Note that $a+2 b+c+2 d-a b-b c-c d-d a=(a+c)+2(b+d)-(a+$ $c)(b+d)$. Let $x=a+c, y=b+d$, then we will find the maximum value of the expression $x+2 y-x y=(y-1)(2-x)+2$, where $-11 \leqslant y-1 \leqslant 9$ and $-8 \leqslant 2-x \leqslant 12$. Therefore, $(y-1)(2-x)+2 \leqslant 9 \cdot 12+2=110$. The maximum value of the expression is achieved when $a=c=-5, b=d=5$.