Königsberg Bridges

아직 제출이 없습니다시간 제한3초메모리 제한512 MB

문제

Given a graph, we say it is Königsbergsy if there is a simple path that goes through all of its bridges. Here, a bridge is an edge that disconnects the graph when removed. And recall that a simple path is a path that visits each vertex at most once.

Given a graph GG, we want to add some edges to it to make it Königsbergsy. (You may add more than one edge between the same pair of vertices). Determine the maximum number of bridges that the resulting graph can have.

입력

The first line contains two integers nn and mm (2n1062 \leq n \leq 10^6; 0m1060 \leq m \leq 10^6), the number of vertices and the number of edges of GG.

Each of the next mm lines contains two integers u_i,v_iu\_i, v\_i (0u_i,v_in10 \leq u\_i, v\_i \leq n-1), describing an edge between vertices u_iu\_i and v_iv\_i.

출력

Output one integer, the maximum number of bridges the resulting graph can have.