#include<bits/stdc++.h>
using namespace std;
using ll = long long;

int n, m, chk[200200], ans;
vector<int> v[200200];

int dfs(int u){
	chk[u] = 1;
	int re = 1;
	for(int x : v[u]) if(!chk[x]) re += dfs(x);
	return re;
}

int main(){
	ios_base::sync_with_stdio(0);cin.tie(0);
	cin >> n >> m;
	for(int i=1;i<=m;i++){
		int a, b; cin >> a >> b;
		v[a].push_back(b), v[b].push_back(a);
	}
	for(int i=1;i<=n;i++) if(!chk[i]) ans = max(ans, dfs(i));
	cout << ans;
}