N, M = map(int, input().split())

members = [-1] * N

group_count = 0
groups = [0] * N
for m in range(M):
    A, B = map(int, input().split())
    A = A - 1
    B = B - 1
    if members[A]==-1 and members[B]==-1:
        members[A] = members[B] = group_count
        groups[group_count] = 2
        group_count += 1
    
    elif members[A]!=-1 and members[B]==-1:
        members[B] = members[A]
        groups[members[A]] += 1
    
    elif members[B]!=-1 and members[A]==-1:
        members[A] = members[B]
        groups[members[B]] += 1
    
    else:
        groups[members[A]] += groups[members[B]]
        groups[members[B]] = 0
        mA = members[A]
        mB = members[B]

        for idx, mem in enumerate(members):
            if mem == mB:
                members[idx] = mA

ans = max(groups)
if ans == 0:
    print(1)
else:
    print(ans)