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

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 $-15 \leqslant y-1 \leqslant 13$ and $-12 \leqslant 2-x \leqslant 16$. Therefore, $(y-1)(2-x)+2 \leqslant 13 \cdot 16+2=210$. The maximum value of the expression is achieved when $a=c=-7, b=d=7$.