#include<bits/stdc++.h>
using namespace std;
vector<int> g[200005];
int n,m,v[200005];
int mx=0,cnt=0;
void dfs(int x,int f){
	v[x]=f,cnt++;
	for(int y:g[x])if(!v[y])dfs(y,f);
}
int main() {
	cin>>n>>m;
	for(int i=1,x,y;i<=m;i++)cin>>x>>y,g[x].push_back(y),g[y].push_back(x);
	for(int i=1;i<=n;i++)if(!v[i])cnt=0,dfs(i,i),mx=max(mx,cnt);
	cout<<mx;
	return 0;
}