In ICPCCamp, there are n towns conveniently labeled with

and m bidirectional roads planned to be built.
The i-th road will be built between cities

and

with cost

.
The builders in ICPCCamp will build the (n - 1) roads with the least total cost to connect any of two cities directly or indirectly.
Bobo, the mayor of ICPCCamp is going to remove some of the roads from the construction plan.
He would like to know the minimum number of roads to be removed to *strictly increase* the total cost.
Note that the total cost is considered as

if no valid (n - 1) roads exist after removing. It is also counted as "total cost strictly increases".