# Lowest Value Function

Algebra Level 4

Define a function $F$ as follows

$F(w,x,y,z)=\dfrac { 1 }{ 8 } \left( S-T \right)$

where

$S=aw+bx+cy+dz-\left| w-x \right| -\left| aw+bx-cy-\left| w-x \right| \right|$
$T=\left| aw+bx+cy-dz-\left| w-x \right| -\left| aw+bx-cy-\left| w-x \right| \right| \right|$

For certain positive integers $a,b,c,d$ and for all $w,x,y,z$, this function $F\left(w,x,y,z\right)$ always returns the lowest of the values $w,x,y,z$. $\;\;$ For example

$F(4,-3,2,1)=-3$.

Let $a,b,c,d$ be integer digits of a $4$ digit integer $A = \overline{abcd}$. What is the value of $A$?

×