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

vector<int>adj[200005];
bool vis[200005];

int dfs(int u)
{ int ans=0;
  if(!vis[u])
{  ans++;
    vis[u]=true;
    for(auto i:adj[u])
    { ans+=dfs(i);
    }
}
 return ans;
}

int main()
  
{memset(vis,false,sizeof(vis));
 
  int n,m;
  cin>>n>>m;
  while(m--)
  { int a,b;
   cin>>a>>b;
   adj[a].push_back(b);
   adj[b].push_back(a);
  }
 int maxi=0;
 
 for(int i=1;i<=n;i++)
 { if(!vis[i])
 { maxi=max(maxi,dfs(i));
 }
 }
 cout<<maxi;

}