#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<vector>
#include<map>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;
#define inf 0x3f3f3f3f
typedef long long LL;
int father[100100];
int n, m;
int find(int x) {
if (x == father[x]) return x;
else return father[x] = find(father[x]);
}
void unio(int a, int b) {
int x1 = find(a);
int y1 = find(b);
if (x1 != y1) {
father[x1] = y1;
}
}
void init() {
for (int i = 0; i <= n; i++) {
father[i] = i;
}
}
int bn[100100];
int main(void) {
while (scanf("%d%d", &n, &m) != EOF) {
init();
memset(bn, 0, sizeof(bn));
for (int i = 0; i < m; i++) {
int a, b;
scanf("%d%d", &a, &b);
unio(a, b);
}
for (int i = 1; i <= n; i++) {
bn[find(i)]++;
}
int maxx = -1;
for (int i = 1; i <= n; i++) {
maxx = max(bn[i], maxx);
}
printf("%d\n", maxx);
}
return 0;
}