On the mass function of star clusters