n,m = gets.split.map &:to_i
abs = []

m.times{
	a,b = gets.split.map &:to_i
	if a < b then
		abs << [a-1,b-1]
	else
		abs << [b-1,a-1]
	end
}

abs.sort!{ |a,b|
	a[1] <=> b[1]
}

nx = Array.new(n, 0)

(0...n).each{ |i|
	nx[i] = i
}

abs.each{ |a,b|
	if nx[a] < nx[b] then
		nx[b] = nx[a]
	else
		nx[a] = nx[b]
	end
}

print nx.group_by(&:itself).map{ |k,v| v.size}.max