// Slower C++ solution:


#include<bits/stdc++.h>

using namespace std;

#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>

#define ll long long

#define si(n) scanf("%d",&n);

#define PI acos(-1.0)

#define sl(n) scanf("%lld",&n);

#define sf(n) scanf("%lf",&n);

#define ss(n) scanf("%s",n);

#define for0(i,n) for(ll i=0;i<n;i++)

#define for1(i,n) for(ll i=1;i<=n;i++)

#define forc(i,j,n) for(ll i=j;i<n;i++)

#define pb push_back

#define sor(n) sort(n.begin(),n.end())

#define sorcmp(n) sort(n.begin(),n.end(),cmp)

#define rev(n) reverse(n.begin(),n.end())

#define pi(x)  printf("%d",x);

#define pl(x)  printf("%lld",x);

#define pf(x)  printf("%.10lf",x);

#define ps(x)  printf("%s",x);

#define en() printf("\n");

#define random_shuffle(r...)random_shuffle(r,[](int _){return rand()%_;})

#define SQR(a) (a)*(a)

#define sp(x) fixed<<setprecision(x)

#define mod 1000000007

#define endl '\n'

#define pii pair<int,int>

#define pll pair<ll,ll>

#define bug cout<<"Here"<<endl

void fastio(){ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);}

template <typename T> T POW(T B,T P){ if(P==0) return 1; if(P&1) return B*POW(B,P-1);  else return SQR(POW(B,P/2));}

ll powmod(ll a, ll b){ll ans = 1;while(b){if(b&1) ans = ans*a%mod;a = a*a%mod;b >>= 1;}return ans;}



#define mxn 200005

vector<int>g[mxn];

int vis[mxn];



int bfs(int x)

{

    vis[x]++;

    queue<int>q;

    q.push(x);

    int cnt=1;

    while(!q.empty())

    {

        int v=q.front();

        q.pop();



        for(auto u:g[v])

        {

            if(vis[u]) continue;

            vis[u]++;

            cnt++;

            q.push(u);

        }

    }



    return cnt;

}





int main()

{





    int n,m;

    cin>>n>>m;



    while(m--)

    {

        int a,b;

        cin>>a>>b;

        g[a].pb(b);

        g[b].pb(a);

    }

    int mx=-1;

    for(int i=1;i<=n;i++)

    {

        if(vis[i]) continue;

        mx=max(mx,bfs(i));

    }



    cout<<mx<<endl;











	return 0;

}




// Faster C++ solution for the same problem (measured speedup: 6.344966897168209x):
#include <bits/stdc++.h>



using namespace std;



#ifndef ONLINE_JUDGE

	#define W(x, y) cerr << "\033[31m" << #x << " = " << x << "\033[0m" << y;

#else

	#define W(x, y)

#endif



using ll = long long;

using pii = pair<int, int>;

using pll = pair<ll, ll>;

using vi = vector<int>;

using vii = vector<pii>;

using vl = vector<ll>;

using vll = vector<pll>;

using ld = long double;

#define ff first

#define ss second

const ld pi = acosl(-1);

const ll prime = 1000000000 + 7;

const ll INF = 1000000000;



struct UnionFind{

    vl pai;

    vl rank;

    vl sum;

    UnionFind(ll n): pai(n), rank(n), sum(n){

        iota(pai.begin(), pai.end(), 0);

        fill(rank.begin(), rank.end(), 1);

        fill(sum.begin(), sum.end(), 1);

    }

    ll Find(ll x){

        if(x == pai[x]){

            return x;

        }

        return pai[x] = Find(pai[x]);

    }

    void Union(ll a, ll b){

        a = Find(a);

        b = Find(b);

        if(a == b){

            return;

        }

        if(rank[a] == rank[b]){

            rank[a]++;

        }

        if(rank[a] < rank[b]){

            sum[b] += sum[a];

            pai[a] = b;

        } else{

            sum[a] += sum[b];

            pai[b] = a;

        }

    }

};





int main(){

    ios::sync_with_stdio(false);

    cin.tie(0); cout.tie(0);



    // ll n, m;

    // while(cin >> n >> m){



    //     UnionFind uf(n*m);

    //     vector<string> vet(n);

    //     for(int i = 0; i < n; ++i){

    //         cin >> vet[i];

    //     }

    //     for(int i = 0; i < n; ++i){

    //         for(int j = 0; j < m; ++j){

    //             if(vet[i][j] == vet[i][(j+1)%m]){

    //                 uf.Union(m*i + j, m*i + (j+1)%m);

    //             }

    //             if(vet[i][j] == vet[(i+1)%n][j]){

    //                 uf.Union(m*i + j, m*((i+1)%n) + j);

    //             }

    //         }

    //     }

    //     ll x, y, res = 0;

    //     cin >> x >> y;

    //     if(vet[x][y] == 'l'){

    //         ll aux = uf.Find(m*x + y);

    //         res = uf.sum[aux] ;

    //     }

    //     cout << res << endl;

    // }

    ll n, m;

    cin >> n >> m;

    UnionFind uf(n+1);

    for(int i = 0; i < m; ++i){

        ll a, b;

        cin >> a >> b;

        uf.Union(a, b);

    }

    ll res = 0;

    for(int i = 1; i <= n; ++i){

        ll aux = uf.Find(i);

        res = max(res, uf.sum[aux]);

    }

    cout << res << endl;



    

    return 0;

}