#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define fi first
#define se second
using namespace std;
list<ll> graph[200005];
bool vis[200005]={0};
ll dfs(ll p){
	if(vis[p])return 0;
	vis[p]=1;
	ll ans=0;
	for(auto i=graph[p].begin();i!=graph[p].end();i++){
		ans+=dfs(*i);
	}
	return ans+1;
}
int main(){
	ll n,m;
	cin>>n>>m;
	for(int i=0;i<m;i++){
		ll a,b;
		cin>>a>>b;
		graph[a].push_back(b);
		graph[b].push_back(a);
	}
	ll ans=0;
	for(int i=1;i<=n;i++){
		if(!vis[i])ans=max(ans,dfs(i));
	}
	cout<<ans;

}
