{ll@n,a[5d4];rd(a(n));rsortA(n,a);wt(sum[i,0,n](a[i]*Ilog2_f(i+1)));}