#graph603. POI2005, Dicing

POI2005, Dicing

POI2005, Dicing

Problem Description

Dicing is a two-player game that is extremely popular in Byteotia; people there even founded a club dedicated to it. Club members often play together and then elect the best player. Now there is an unlucky fellow who wants to become that best player. He already knows the entire schedule of matches. He wonders: no matter how the matches turn out, what is the minimum number of wins the eventual best player will end up with?

Input Format

The first line contains two integers n,m (1≤n,m≤104)n, m\ (1 \le n, m \le 10^4), where nn is the number of players and mm is the number of matches. The players are numbered 11 through nn. Each of the next mm lines contains two integers, the two players of that match. The same pair of players may meet more than once.

Output Format

Output one number: the minimum number of wins the best player must have.

Sample Input

4 4
1 2
1 3
1 4
1 2

Sample Output

1