#include <bits/stdc++.h>

using namespace std;

int a[200020];
int si[200020];

int ff(int x) {
    return a[x]= a[x] == x ? x : ff(a[x]);
}


int main() {
    int n, m;
    cin >> n >> m;
    for (int i = 1; i <= n; i++)a[i] = i, si[i] = 1;
    for (int i = 1; i <= m; i++) {
        int x, y;
        cin >> x >> y;
        x = ff(x);
        y = ff(y);
        if (x != y) {
            a[y] = x;
            si[x] += si[y];
        }
    }
    int ma = 1;
    for (int i = 1; i <= n; i++) {
        ma = max(ma, si[i]);
    }
    cout << ma << endl;
    return 0;
}