Clustering cost, first part