On a weighted sum of distances from a well distributed set of points