#include<stdio.h>
#include<algorithm>
using namespace std;
int p[10000010] , rk[10000010] , maxn ;
int m ;
void init ()
{
for (int i = 0 ; i <= 10000010 ; i++) {
p[i] = i ;
rk[i] = 1 ;
}
maxn = 0 ;
}
int find (int x)
{
return x == p[x] ? x : p[x] = find (p[x]) ;
}
void Union (int x , int y)
{
p[x] = y ;
rk[y] += rk[x] ;
maxn = max (maxn , rk[y]) ;
rk[x] = 0 ;
}
int main ()
{
//freopen ("a.txt" , "r" , stdin ) ;
int x , y ;
while (~ scanf ("%d" , &m) ) {
init () ;
for (int i = 0 ; i < m ; i++ ) {
scanf ("%d%d" , &x , &y ) ;
x = find (x) ;
y = find (y) ;
if (x != y)
Union ( x , y ) ;
}
if (maxn )
printf ("%d\n" , maxn ) ;
else
printf ("1\n") ;
}
return 0 ;
}