#include<cstdio>
#include<algorithm>
#include<cmath>
#include<iostream>
#include<cstring>
using namespace std;
const int maxn = 1000005;
int MAX;
int num[maxn],f[maxn];
int find(int x){
return x == f[x] ? f[x] : f[x] = find(f[x]);
}
void baba(int x ,int y){
int fx = find(x),fy = find(y);
f[fx] = fy;
}
int main(){
int n,m,a,b;
while(scanf("%d %d",&n,&m)!=EOF){
memset(num,0,sizeof(num));
for(int i = 1; i <= n ; i++){
f[i] = i;
}
MAX = 0;
for(int i = 1 ; i <= m ; i++){
scanf("%d %d",&a,&b);
baba(a,b);
}
for(int i = 1 ; i <= n ; i++){
find(i);
}
for(int i = 1 ; i <= n ; i++){
num[f[i]]++;
MAX =max(MAX,num[f[i]]);
}
printf("%d\n",MAX);
}
return 0;
}