#include<bits/stdc++.h>
using namespace std;
int n,m,fa[200010],sz[200010],ans;
inline int Find(int x){
	if(x==fa[x])
		return x;
	fa[x]=Find(fa[x]);
	return fa[x];
}
inline void Merge(int x,int y){
	int fx=Find(x),fy=Find(y);
	if(fx==fy)
		return;
	fa[fx]=fy;
	sz[fy]+=sz[fx];
}
int main(){
	cin>>n>>m;
	for(int i=1;i<=n;i++){
		fa[i]=i;
		sz[i]=1;
	}
	while(m--){
		int x,y;
		cin>>x>>y;
		Merge(x,y);
	}
	for(int i=1;i<=n;i++)
		ans=max(ans,sz[i]);
	cout<<ans<<endl;
	return 0;
}