Consider the sum of the maximum number of visits each friend can make without visiting his/her maximum number of times.