For two variables, their maximum $\max\{x_1,x_2\}$ can be expressed using one $|\cdot|$ operation: $$ \max\{x_1,x_2\} = \frac12(x_1+x_2+|x_1-x_2|). $$ For $3$ variables, it seems fairly clear that three $|\cdot|$ operations are necessary, though I can only demonstrate sufficiency: $$ \max\{x_1,x_2,x_3\} = \frac14\left[ 2x_1+x_2+x_3+|x_2-x_3|+2\left|x_1-\frac12(x_2+x_3+|x_2-x_3|)\right| \right] . $$ For $5$ variables, it has been claimed here https://twitter.com/ereliuer_eteer/status/1669081421007454209 that the minimum number of $|\cdot|$ operations is 54, though I have verified neither sufficiency nor necessity.
Question: How many $|\cdot|$ operations are necessary for $n$ variables? To be explicit about the rules, in addition to $|\cdot|$, the 4 arithmetic operations are allowed.
Update. That twitter post I linked is actually computing the median, not the max of 5 variables. So the analogous question for abs-operation complexity, but now for the median, is quite natural.