#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
constexpr int MX = 200005;
int p[MX], n, m, a, b, ans=1;
int find(int x){return (p[x] < 0 ? x : p[x] = find(p[x]));}
void uni(int x, int y){
	x = find(x); y = find(y);
	if(x != y){
		if(p[x] > p[y]) swap(x, y);
		p[x] += p[y];
		p[y] = x;
		ans = max(ans, -p[x]);
	}
}
int main(){
	scanf("%d%d", &n, &m);
	fill(p, p+n, -1);
	rep(i,m){
		scanf("%d%d", &a, &b);
		uni(a-1,b-1);
	}
	printf("%d\n", ans);
}