ll s,n,y[2d6];{rd(n,y(n));sort(y,y+n);s+=abs(y[0..n-1]-y[n/2]);wt(s);}