A mean-field monomer-dimer model with attractive interaction. The exact solution