A company models its office network as an undirected graph. Machines are numbered 0 through n-1. Some pairs of machines are directly cabled together. Two machines are in the same cluster if you can travel from one to the other by following cables (directly or through other machines).
Given the machines and the cables, report how many clusters the network forms. A machine with no cables of its own still counts as a cluster of size one.
Input format
Line 1: two integers n and m — the number of machines and the number of cables.
Next m lines: two integers u v (0-indexed) meaning there is a cable between machine u and machine v.
The graph is undirected. It may contain self-loops (u == v) and duplicate cables; these never change which machines are connected.
Output format
A single integer: the number of connected components (clusters).
Constraints
- 1 ≤ n ≤ 100000
- 0 ≤ m ≤ 200000
- 0 ≤ u, v ≤ n-1