Delivery robots
문제
Juku likes hot dogs. A lot.
Juku lives in a town that has intersections and two-way streets connecting the intersections. Intersections have been numbered . No pair of intersections is connected by more than one street and no street connects an intersection to itself. From every intersection it is possible to get to every other intersection along the streets. Also, there is a hot dog stand on every intersection.
Juku has started building delivery bots that would bring hot dogs to him. He wants to choose two intersections---initial location of robots and his own location ---and code robots such that he could get hot dogs from as many different stands as possible.
Unfortunately, programming the robots is rather limited. Every robot can store an array and a variable in memory. Robot starts moving from intersection and repeats the following steps:
- If robot is located at intersection , it will buy a hot dog from the stand there.
- If robot is located at intersection , it will give the hot dog to Juku and stop.
- Robot moves to intersection where is its current location.
For every there must be a street between intersections and , otherwise the robot will crash.
Find the maximum number of different stands that Juku can get hot dogs from if he chooses and optimally and enters and into robots optimally as well. The values and are the same for all robots, but and can be different for every robot. You may assume that Juku can use arbitrarily many robots.
입력
First line of input contains two integers and ---numbers of intersections and streets (, ). On the next lines there are two integers and on each, indicating a street between intersections and .
출력
The output should contain a single integer---the maximum number of different stands that Juku can get hot dogs from.
예제
예제 1
6 6 1 2 2 3 3 1 4 1 5 2 6 3
5