시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB66464473.333%

문제

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.

입력

The first line of the input contains two integers n and m: the number of vertices and the number of edges in your graph (1 ≤ n, m ≤ 105).

The next m lines contain description of the edges of the graph. Each of these lines contains two integers ai and bi, describing an edge between vertices ai and bi (1 ≤ ai, bi ≤ n, ai ≠ bi).

It is guaranteed that there are no multiple edges.

출력

Print 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.

예제 입력 1

5 3
3 5
5 1
1 3

예제 출력 1

1

출처

Camp > Petrozavodsk Programming Camp > Winter 2019 > Day 1: 300iq Contest F번

  • 문제를 만든 사람: 300iq