# Verified: https://atcoder.jp/contests/atc001/submissions/16154602
class UnionFind
	Node = Struct.new(:p, :h)
	def initialize(size)
		@p, @r = size.times.to_a, [0]*size
	end
	def unite(i, j)
		k, l = parent(i), parent(j); if @r[k] < @r[l]; @p[k] = l; @r[l] += 1 if @r[k] == @r[l]; else; @p[l] = k; end
	end
	def united?(i, j)
		parent(i) == parent(j)
	end
	def parent(i)
		j = i; until i == @p[i]; j, i = i, @p[j] = @p[i]; end; i
	end
end

n, m = gets.split.map &:to_i
uf = UnionFind.new n
m.times do
	a, b = gets.split.map &:to_i
	uf.unite a-1, b-1
end

parents = [0] * n
n.times do |i|
	parents[uf.parent i] += 1
end

p parents.max