Mazes

You are in charge of designing a maze. Traditional mazes have a single entry and a sequence of correct choices (which branch to take at a fork) leads you to the destination. This maze is somewhat different. There are several inputs and the destination is not accessible from all of them.

You can model a maze as an undirected graph, where nodes are the forks and edges are direct paths between nodes (i.e. paths that do not contain forks). You are given the graph in this problem. In order to make the maze adequately challenging, you want to keep the number of connected components low. In this problem, your job is to count the number of components in the given graph.

Input
The input is a single graph. The first line contains integers n, m separated by a single blank space, denoting the number of nodes and number of edges respectively. You can assume n < 30000, m < 100000. Nodes are numbered 1 through n.

Each of the following m lines contains a pair of vertices a,b separated by a single blank space denoting an edge from a to b.

Output
The output is a single integer denoting the number of connected components in the given graph.

Sample input
4 2
1 2
3 4

Sample output
2