#include <stdio.h>
#include <algorithm>
#define Nmax 100002
using namespace std;

int N,M;
int grad[Nmax];

int main(){
	int i,x,y,mx=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",&x,&y);
		grad[x]++; grad[y]++;
		mx=max(mx,grad[x]);
	}
	
	printf("%d\n",mx/2+1);
	fclose(stdin); fclose(stdout);
	return 0;
}

	