406113: GYM102268 F Free Edges
Description
You have an undirected graph. Initially, all edges are white. You can choose some edges and paint them black.
After that, while there is a vertex such that exactly one white edge comes out of it, this white edge also becomes black.
Your goal is to choose the minimum possible number of edges to paint black such that, after the process is finished, all edges will be black.
InputThe first line of the input contains two integers $$$n$$$ and $$$m$$$: the number of vertices and the number of edges in your graph ($$$1 \leq n, m \leq 10^5$$$).
The next $$$m$$$ lines contain description of the edges of the graph. Each of these lines contains two integers $$$a_i$$$ and $$$b_i$$$, describing an edge between vertices $$$a_i$$$ and $$$b_i$$$ ($$$1 \leq a_i, b_i \leq n$$$, $$$a_i \neq b_i$$$).
It is guaranteed that there are no multiple edges.
OutputPrint one integer: the minimum possible number of edges you need to paint black such that, after the end of the described process, all edges will be black.
ExampleInput5 3Output
3 5
5 1
1 3
1