PepperLa is good at dealing with string problems, so he's going to offer string algorithm courses.
PepperLa has set up $N$ class rooms, there's one road between every two class rooms, and each road is equal in length.
PepperLa is afraid of the dark, so he only walks on roads with the light on. At the beginning, there is no light on. PepperLa has to pay one dollar for lighting the light of a road. However, PepperLa is dreaming of buying himself a switch, so he would like to pay the least.
The courses are scheduled so tightly that PepperLa can't afford to waste his time. So the distance between two class room should not be too far away. Specifically, you need to light the fewest roads so that the shortest path between class room $i$ and class room $j$ should eaqual to $dis[i][j]$.
Please tell PeoperLa how much is the minimum he has to pay.