#include <bits/stdc++.h>

using namespace std;

int p[200005], siz[200005];

int find(int s) {
	if (s == p[s]) return s;
	return p[s] = find(p[s]);
}

int main() {
	int n, m;
	scanf("%d%d", &n, &m);
	
	for (int i = 1; i <= n; i++) {
		p[i] = i;
		siz[i] = 1;
	}
	
	int res = 1;
	
	for (int i = 0; i < m; i++) {
		int x, y;
		scanf("%d%d", &x, &y);
		
		int u = find(x);
		int v = find(y);
		
		if (u != v) {
			p[u] = v;
			siz[v] += siz[u];
			res = max(res, siz[v]);
		}
	}
	
	printf("%d\n", res);
}
