eolymp
bolt
Try our new interface for solving problems
Problems

Paths in multigraph

Paths in multigraph

Given is an undirected multigraph G without loops. Write a program, which determines the minimum number of edges that must be removed from G, so that the resulting multigraph to be disconnected.

Input

The first line contains an integer n (2n100)- the number of vertices in G. The vertices of the multigraph G are numbered from 1 to n. The second line contains an integer m (0m3000) - the number of edges in G. The next m lines contain the endpoints u and v of the consecutive edge in multigraph G.

Output

Print the minimum number of edges that must be removed from G, so that the resulting multigraph to be disconnected.

Time limit 1 second
Memory limit 128 MiB
Input example #1
2
3
1 2
1 2
1 2
Output example #1
3
Input example #2
3
2
1 2
2 3
Output example #2
1
Input example #3
3
1
1 2
Output example #3
0
Source 2016 VIII International autumn tournament in informatics, Shumen, Junior, Problem A