eolymp
bolt
Try our new interface for solving problems
Problems

Bridges

Bridges

King Julian's domain is located on n islands, numbered from 1 to n. Some pairs of islands are connected to each other by bridges, through which you can move in two directions. There are m bridges between the islands in total. From any island you can get to any other by moving over bridges.

We'll call a bridge to be critical, if in the case of collapsing this bridge, there will be such two islands that it is impossible to get from one of them to the other by moving along the remaining bridges.

King Julian is very concerned about the security and availability of communications in his domain. He wants to build additional bridges between some pairs of islands so that there are no critical bridges between the islands. Since the king is also economical, he wants to find out what is the minimum number of additional bridges that can be built in order to fulfill this requirement.

Input

The first line contains two integers n and m (2n105, 1m2 * 105) - the number of islands and the number of bridges between them.

The next m lines contain two integers ai and bi (1ai, bin, aibi) - numbers of islands connected by i-th bridge.

It is guaranteed that one can get from any island to any other by moving over bridges.

Output

Print a single integer - the minimum number of additional bridges that need to be built so that there are no critical bridges between the islands.

Time limit 1 second
Memory limit 128 MiB
Input example #1
5 5
1 2
2 3
2 4
2 5
4 5
Output example #1
1
Input example #2
2 1
1 2
Output example #2
1
Source 2020 Cycle of Internet Olympiads for schoolchildren, Fifth team contest, Novemver 28, Advanced level, Problem E