Summer training is coming soon, and in order to achieve good results in the upcoming contests, everyone wants to find their favorite teammates to form their own dream team!
There are

students in the training team with corresponding numbers

to

, and they will form

teams, each consisting of

students . It is now known that there are

pairs of students
)
who are
directly familiar with each other (i.e.

is directly familiar with

, and

is directly familiar with

) .
Friends of friends are friends. We define that student

is
familiar with student

if one of the following conditions is met:
1.

is
directly familiar with

, or
2. There exists a series of students
)
satisfies:
-
is directly familiar with
-
For all
,
is directly familiar with
-
is directly familiar with
As a retired contestant, Colin clearly knows that it is important for teammates to be familiar with each other. We define a student's anxiety level as the number of students in his team that he is
not familiar with (of course everyone is familiar with himself) . Now Colin wants you to find a plan satisfies: divide all

students into

teams, and each student is in exactly one team, and each team has exactly

students, and minimize the sum of anxiety level of all

students.
You only need to tell Colin the minimum sum of anxiety level of all

students.