#include<cstdio>
#include<ctime>
#include<cstdlib>
#define Nmax 100010
using namespace std;

int n,m,a,b,grad[Nmax],i,Max,sol; 

int main()
{
	srand(time(0));
	
	freopen("dag.in","r",stdin);
	freopen("dag.out","w",stdout);
	
	scanf("%d %d",&n,&m);
	
	for( i = 1 ; i <= m ; i++ )
	{
		scanf("%d %d",&a,&b);
		
		grad[a]++;
		grad[b]++;
		
		if(grad[a] > Max ) Max = grad[a];
		if(grad[b] > Max ) Max = grad[b];
	}
	
	sol = 1 + rand() % Max ;
	
	printf("%d\n",sol);
	
	return 0 ;
}