#include <bits/stdc++.h>
using namespace std;
int f[200010];
int B[200010];
int find(int a){
    if(f[a] == a) return a;
    return f[a] = find(f[a]);
}
void jr(int a,int b){
    int t1 = find(a), t2 = find(b);
    if(t1 != t2) f[t1] = t2;
}
int n, m, x, y;
int main(){
	scanf("%d%d", &n, &m);
	for(int i = 1 ; i <= 200000 ; i++) f[i] = i;
	for(int i = 1 ; i <= m ; i++){
		scanf("%d%d", &x, &y);
		jr(x, y);
	}
	int Ans = 0;
	for(int i = 1 ; i <= n ; i++){
		B[find(i)]++;
		Ans = max(Ans, B[find(i)]);
	}
	printf("%d", Ans);
	return 0;
}