Sort the numbers in ascending or descending order, then eliminate the greatest and least numbers until you're left with the middle two. The median is the average of the last two numbers.
For example, the median for the set

is 3 because the middle two numbers are 2 and 4, and their average is

.
Subtract the two over to cancel it out
3x=36
then divide by 3 to get an answer of
x=12
If the input value is negative, the output value is always positive. We know this because the negative sign before the 4z will always reverse the negativity of the number that is plugged in.
I’m not 100% but my best guess is 20.