import sys

sys.setrecursionlimit(int(1e6))



def search(x, num):

    nodes.remove(x)

    for y in edge[x]:

        edge[y].discard(x)

    for y in list(edge[x]):

        if y in nodes:

            num = search(y, num)

    return num + 1



(n,m),*d  = [list(map(int, s.split())) for s in open(0)]



edge = [set() for _ in range(n+1)]

for x in d:

    edge[x[0]].add(x[1])

    edge[x[1]].add(x[0])



nodes = set(range(1,n+1))

ans = 1

for x in list(nodes):

    if x in nodes:

        ans = max(ans, search(x, 0))

print(ans)
import sys

sys.setrecursionlimit(int(1e6))



def search(x, num):

    nodes.remove(x)

#     for y in edge[x]:

    for y in list(edge[x]):

        edge[y].remove(x)

        if y in nodes:

            num = search(y, num)

    return num + 1



(n,m),*d  = [list(map(int, s.split())) for s in open(0)]



edge = [set() for _ in range(n+1)]

for x in d:

    edge[x[0]].add(x[1])

    edge[x[1]].add(x[0])



nodes = set(range(1,n+1))

ans = 1

for x in list(nodes):

    if x in nodes:

        ans = max(ans, search(x, 0))

print(ans)
import sys

sys.setrecursionlimit(int(1e6))


def search(x, num):
    nodes.remove(x)
    for y in edge[x]:
        edge[y].discard(x)
    for y in list(edge[x]):
        if y in nodes:
            num = search(y, num)
    return num + 1


(n, m), *d = [list(map(int, s.split())) for s in open(0)]
edge = [set() for _ in range(n + 1)]
for x in d:
    edge[x[0]].add(x[1])
    edge[x[1]].add(x[0])
nodes = set(range(1, n + 1))
ans = 1
for x in list(nodes):
    if x in nodes:
        ans = max(ans, search(x, 0))
print(ans)

import sys

sys.setrecursionlimit(int(1e6))


def search(x, num):
    nodes.remove(x)
    #     for y in edge[x]:
    for y in list(edge[x]):
        edge[y].remove(x)
        if y in nodes:
            num = search(y, num)
    return num + 1


(n, m), *d = [list(map(int, s.split())) for s in open(0)]
edge = [set() for _ in range(n + 1)]
for x in d:
    edge[x[0]].add(x[1])
    edge[x[1]].add(x[0])
nodes = set(range(1, n + 1))
ans = 1
for x in list(nodes):
    if x in nodes:
        ans = max(ans, search(x, 0))
print(ans)

-    for y in edge[x]: -        edge[y].discard(x) +    #     for y in edge[x]: +        edge[y].remove(x)