

class UnionFindTree
	#シンプルシンプルなUnionFind
	attr_accessor :nodes
	def initialize(size)
		@nodes = Array.new(size)
		size.times do |i|
			@nodes[i] = -1
		end
		nodes = @nodes
	end
 
	def findParent(x)
		if @nodes[x] < 0 then 
			return x
		else
			return findParent(@nodes[x])
		end
	end
 
	def unite(x, y)
		xx = findParent(x)
		yy = findParent(y)
		return if xx == yy
 
		xx, yy = yy, xx if @nodes[xx] > @nodes[yy]
 
		@nodes[xx] += @nodes[yy]
		@nodes[yy] = xx
	end
 
	def same(x, y)
		return findParent(x) == findParent(y)
	end
end



n, m = gets.chomp.split.map(&:to_i)
arr = Array.new(n, -1)
cnt = 0
uft = UnionFindTree.new(n)
m.times do 
	a, b = gets.chomp.split.map{|c| c.to_i - 1}
	uft.unite(a, b)
end

hash = {}
n.times do |i|
	parent = uft.findParent(i)
	if hash.has_key?(parent)
		hash[parent] += 1
	else
		hash[parent] = 1
	end
end

puts hash.max{|(a,b), (c,d)| b<=>d}[1]


