  We introduce and study the median maximal function \mathcal{M} f, defined in
the same manner as the classical Hardy-Littlewood maximal function, only
replacing integral averages of f by medians throughout the definition. This
change has a qualitative impact on the mapping properties of the maximal
operator: in contrast with the Hardy-Littlewood operator, which is not bounded
on L^1, we prove that \mathcal{M} is bounded on L^p(w) for all 0 < p < \infty,
if and only if w \in A_{\infty}. The characterization is purely qualitative and
does not give the dependence on [w]_{A_{\infty}}. However, the sharp bound
\|\mathcal{M}\|_{L^1(w) \to L^1(w)} \lesssim [w]_{A_1} is established.
