Downtown One-Way Streets

No attempts yetTime limit1sMemory limit128 MB

Problem

The councillors of the city of Los Hippopotalamos are overwhelmed with complaints about downtown traffic jams. Most residents refuse to walk and instead ride the local means of transport — the hippos. The downtown lanes are narrow and the hippos are large, so when two hippos meet head-on in a lane they get stuck and block traffic for a very long time. To eliminate these collisions, the councillors have decided to turn every lane into a one-way street.

You are given a map of the town as an undirected planar graph: intersections are the vertices, and each two-way lane between two intersections is an edge. You must assign a direction to every lane, turning each edge into a one-way street. For an intersection, its number of outgoing streets is how many lanes leave it. The councillors want to spread the outgoing traffic as evenly as possible, so they want the largest number of outgoing streets at any single intersection to be as small as possible.

Over all ways of orienting every lane, find the smallest possible value of that maximum, i.e. the minimum achievable value of maxvoutdeg(v)\max_v \operatorname{outdeg}(v).

Input

The first line contains two integers NN and MM (1N2000001 \le N \le 200000, 1M10000001 \le M \le 1000000), where NN is the number of intersections and MM is the number of lanes. Each of the next MM lines contains two integers ii and jj (1i,jN1 \le i, j \le N) describing a lane between intersections ii and jj. The graph is planar and simple: it can be drawn in the plane so that edges meet only at shared endpoints, and it has no loops and no repeated lanes between the same pair of intersections.

Output

Print a single integer: the smallest possible value, over all ways of orienting every lane, of the maximum number of outgoing streets at any intersection.