eolymp
bolt
Try our new interface for solving problems

Now

In every sense, it's winter now. Only memories of the past could make us see the clear view of things. --- \textit{Is it really the end? } --- \textit{Who knows... } --- \textit{Let's hurry up!} The undirected graph without loops and multiple edges is given. Find the size of the maximal matching, i. e. maximum size of the subset \textbf{P} of the graph edges, considering that every vertex has no more than one edge from \textbf{P}. \InputFile In the first line you are given two integers \textbf{N} (\textbf{1} ≤ \textbf{N} ≤ \textbf{400}) and \textbf{K} (\textbf{0} ≤ \textbf{K} ≤ \textbf{N·(N-1)/2}) --- number of verticles and edges in the graph. Every line of the next \textbf{K} contains two integers \textbf{u} and \textbf{v} --- description of one edge. Graph is guaranteed to be rather random. \OutputFile Print one integer - the size of the maximal matching.
Time limit 1 second
Memory limit 64 MiB
Input example #1
5 5
1 2
1 3
1 4
1 5
2 3
Output example #1
2