#include <bits/stdc++.h>
using namespace std;

#define MAXN (1<<18)
int dsu[MAXN], sz[MAXN];
int f(int x){return dsu[x]?dsu[x]=f(dsu[x]):x;}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n,m;
    cin >> n >> m;
    fill(sz, sz + n+1, 1);
    for (int i = 0,u,v; i < m; ++i) {
        cin >> u >> v;
        int a = f(u), b = f(v);
        if (a!=b) {
            dsu[a] = b;
            sz[b] += sz[a];
        }
    }
    cout << *max_element(sz, sz+n+1);
}