#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<stack>
using namespace std;
const int inf = 0x3f3f3f3f;
#define LL long long int
long long gcd(long long a, long long b) { return a == 0 ? b : gcd(b % a, a); }
int F[100005],n,m,num[100005];
int find(int x)
{
if(F[x]==x)return x;
else return F[x]=find(F[x]);
}
int main()
{
while(scanf("%d %d",&n,&m)!=EOF)
{
for(int i=1;i<=n;i++)F[i]=i,num[i]=0;
for(int i=1;i<=m;i++)
{
int u,v;
scanf("%d %d",&u,&v);
int t1=find(u);
int t2=find(v);
if(t1!=t2)F[t1]=t2;
}
int ans=0;
for(int i=1;i<=n;i++)
{
int fx=find(i);
num[fx]++;
ans=max(ans,num[fx]);
}
printf("%d\n",ans);
}
}