P6680 [CCO 2019] Marshmallow Molecules

Description

There is an undirected graph with $N$ vertices and $M$ edges. The graph has no multiple edges and no self-loops. If $a

Input Format

The first line contains two integers $N$ and $M$. The next $M$ lines each contain two integers $a_i$ and $b_i$, indicating that there is an edge connecting $a_i$ and $b_i$.

Output Format

Only one line with one integer, representing the final number of edges.

Explanation/Hint

#### Explanation for Sample 1 You need to add two edges, $(2,4)$ and $(5,6)$. #### Constraints and Limits For $100\%$ of the testdata, it is guaranteed that $1\le N,M\le 10^5$, $1\le a_i