Count Connected Components
Count the connected components of an undirected graph, including isolated vertices.
Input
The first line contains n and m. The next m lines contain undirected edges.
1 <= n <= 10000 <= m <= n(n-1)/2
Output
Print the number of connected components.
Example
Input
6 3
1 2
2 3
5 6
Output
3
Comments