After heavy rain, a district sets up
Your task is to count how many separate rescue regions exist.
The first line contains two integers KaTeX can only parse string typed expression and KaTeX can only parse string typed expression — the number of camps and usable roads.
Each of the next KaTeX can only parse string typed expression lines contains two integers KaTeX can only parse string typed expression and KaTeX can only parse string typed expression, meaning camp KaTeX can only parse string typed expression and camp KaTeX can only parse string typed expression are connected by a two-way road.
Print a single integer — the number of separate rescue regions.
Input
5 3
1 2
2 3
4 5Output2ExplanationCamps KaTeX can only parse string typed expression form one region and camps KaTeX can only parse string typed expression form another region.
Example 2:
Input
4 0Output4ExplanationThere are no roads, so every camp is its own rescue region.