AT_abc399_c [ABC399C] Make it Forest
Description
You are given a simple undirected graph with $ N $ vertices and $ M $ edges, where the vertices are labeled $ 1 $ to $ N $ . The $ i $ -th edge connects vertices $ u_i $ and $ v_i $ .
What is the minimum number of edges that need to be deleted from this graph so that the graph becomes a forest?
What is a forest? A simple undirected graph $ F $ is called a forest if and only if $ F $ does not contain any cycle.
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ M $ $ u_1 $ $ v_1 $ $ u_2 $ $ v_2 $ $ \vdots $ $ u_M $ $ v_M $
Output Format
Print the answer.
Explanation/Hint
### Sample Explanation 1
For example, if you delete the first edge, the graph becomes a forest.
### Constraints
- $ 1 \leq N \leq 2 \times 10^5 $
- $ 0 \leq M \leq \min \left( \frac{N(N-1)}{2}, 2 \times 10^5\right) $
- $ 1 \leq u_i < v_i \leq N $
- The given graph is simple.
- All input values are integers.