// Original C++ solution (slower):
#include <iostream>

#include <vector>

#include <set>

#include <deque>

#include <map>

#include <iomanip>

#include <queue>

#include <stack>

#include <algorithm>

#include <cmath>

#include <cstring>

#include <utility>

using namespace std;

int ky[8] = {-1,1,-2,2,-2,2,-1,1}; 

int kx[8] = {-2,-2,-1,-1,1,1,2,2};

int dy[4] = {-1,0,1,0};

int dx[4] = {0,1,0,-1};

int ddy[8] = {-1,0,1,-1,1,-1,0,1};

int ddx[8] = {-1,-1,-1,0,0,1,1,1};

typedef long long ll;

#define pi pair

#define MP make_pair

#define PB push_back

#define F first

#define S second

#define rep1(i,a,b) for(int i = a; i < b; i++)

#define rep2(i,a,b) for(int i = a; i <= b; i++) 

#define INF 999999999999

const double PI = acos(-1.0); 

int n,m;

vector<int> adj[200001];

int a,b;

set<pi<int,int>> s;

ll ans;

bool vis[200001];

ll cnt;

ll ret;



void dfs(int here){

    if(vis[here]) return;

    vis[here] = true;



    cnt++;

    int sz = adj[here].size();



    rep1(i,0,sz){

        int next = adj[here][i];

        dfs(next);

    }

}



int main()

{

    ios::sync_with_stdio(0);

    cin.tie(0);

    //freopen("input.txt","r",stdin);

    //freopen("output.txt","w",stdout);

    cin >> n >> m;

    rep1(i,0,m){

        cin >> a >> b;

        swap(a,b);

        if(s.count({a,b})) continue;

        s.insert({a,b});



        adj[a].PB(b);

        adj[b].PB(a);

    }



    rep2(i,1,n){

        cnt = 0;

        dfs(i);

        ans = max(ans, cnt);

    }



    //cout << ans << ' ' << ret << '\n';

    cout << ans;

	return 0;

}

// Optimized solution to the same problem (faster):
#include <iostream>

#include <vector>

#include <set>

#include <deque>

#include <map>

#include <iomanip>

#include <queue>

#include <stack>

#include <algorithm>

#include <cmath>

#include <cstring>

#include <utility>

using namespace std;

int ky[8] = {-1,1,-2,2,-2,2,-1,1}; 

int kx[8] = {-2,-2,-1,-1,1,1,2,2};

int dy[4] = {-1,0,1,0};

int dx[4] = {0,1,0,-1};

int ddy[8] = {-1,0,1,-1,1,-1,0,1};

int ddx[8] = {-1,-1,-1,0,0,1,1,1};

typedef long long ll;

#define pi pair

#define MP make_pair

#define PB push_back

#define F first

#define S second

#define rep1(i,a,b) for(int i = a; i < b; i++)

#define rep2(i,a,b) for(int i = a; i <= b; i++) 

#define INF 999999999999

const double PI = acos(-1.0); 

int n,m;

int ans;

int a,b;



struct dsu{

    int p[200001],r[200001];

    void init(int n){

        rep2(i,1,n){

            p[i] = i;

            r[i] = 1;

        }

    }

    int find(int u){

        if(u == p[u]) return u;

        return p[u] = find(p[u]);

    }

    int merge(int u, int v){

        u = find(u); v = find(v);

        if(u == v) return 0;



        if(r[u] > r[v]){

            r[u] += r[v];

            p[v] = u;

        }

        else{

            r[v] += r[u];

            p[u] = v; 

        }

        return 1;

    }

};



int main()

{

    ios::sync_with_stdio(0);

    cin.tie(0);

    //freopen("input.txt","r",stdin);

    //freopen("output.txt","w",stdout);

    cin >> n >> m;

    dsu d;

    d.init(n);

    ans = -10;



    rep1(i,0,m){

        cin >> a >> b;

        d.merge(a,b);

    }



    rep2(i,1,n){

        ans = max(ans, d.r[i]);

    }

    cout << ans;

	return 0;

}

// Fastest known solution for this problem: