Not an answer yet, but some thoughts that may lead to one... Let $$G(z) = \int \mathbb{1}_{\pi(y)\geq z} ~dy$$ then $$I = \int \int_{x,y} \min( \pi(x), \pi(y) )~dx~dy = 2 \int \pi(x) G(\pi(x))~dx$$ $$I = 2 \int_{0}^{\pi_{\max}} z G(z) \int \mathbb{1}_{\pi(x)=z} dx dz$$ $$I = 2 \int_{0}^{\pi_{\max}} zG(z)G'(z) dz$$ edit: seems there's already an elegant answer