class UnionFind():

    def __init__(self, n):

        self.n = n

        self.parents = [-1]*n

        

    def find(self, x):

        if self.parents[x] < 0:

            return x

        else:

            self.parents[x] = self.find(self.parents[x])

            return self.parents[x]

        

    def union(self, x, y):

        x = self.find(x)

        y = self.find(y)

        

        if x == y:

            return

        

        if self.parents[x] > self.parents[y]:

            x,y = y,x

            

        self.parents[x] += self.parents[y]

        self.parents[y] = x



n, m = list(map(int,input().split()))



uf = UnionFind(n)



ab = [tuple(map(int,input().split())) for _ in range(m)]



for a,b in ab:

    uf.union(a-1,b-1)



ans = -1

for i in uf.parents:

    ans = min(i,ans)

    

print((-ans))
class UnionFind():

    def __init__(self, n):

        self.n = n

        self.parents = [-1]*n

        

    def find(self, x):

        if self.parents[x] < 0:

            return x

        else:

            self.parents[x] = self.find(self.parents[x])

            return self.parents[x]

        

    def union(self, x, y):

        x = self.find(x)

        y = self.find(y)

        

        if x == y:

            return

        

        if self.parents[x] > self.parents[y]:

            x,y = y,x

            

        self.parents[x] += self.parents[y]

        self.parents[y] = x



def main():

    n, m = list(map(int,input().split()))

    uf = UnionFind(n)

    for i in range(m):

        a,b = list(map(int,input().split()))

        uf.union(a-1,b-1)

    print((-min(list(uf.parents))))

    

main()
class UnionFind:
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.parents[x] > self.parents[y]:
            x, y = y, x
        self.parents[x] += self.parents[y]
        self.parents[y] = x


n, m = list(map(int, input().split()))
uf = UnionFind(n)
ab = [tuple(map(int, input().split())) for _ in range(m)]
for a, b in ab:
    uf.union(a - 1, b - 1)
ans = -1
for i in uf.parents:
    ans = min(i, ans)
print((-ans))

class UnionFind:
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.parents[x] > self.parents[y]:
            x, y = y, x
        self.parents[x] += self.parents[y]
        self.parents[y] = x


def main():
    n, m = list(map(int, input().split()))
    uf = UnionFind(n)
    for i in range(m):
        a, b = list(map(int, input().split()))
        uf.union(a - 1, b - 1)
    print((-min(list(uf.parents))))


main()

-n, m = list(map(int, input().split())) -uf = UnionFind(n) -ab = [tuple(map(int, input().split())) for _ in range(m)] -for a, b in ab: -    uf.union(a - 1, b - 1) -ans = -1 -for i in uf.parents: -    ans = min(i, ans) -print((-ans)) +def main(): +    n, m = list(map(int, input().split())) +    uf = UnionFind(n) +    for i in range(m): +        a, b = list(map(int, input().split())) +        uf.union(a - 1, b - 1) +    print((-min(list(uf.parents)))) + + +main()