#ruby
#UnionFind

class UnionFind

	def initialize(arr)
		@union_root = {}
		@union_size = {}
		arr.each do |e|
			@union_root[e] = e
			@union_size[e] = 1
		end
	end

	def find(obj)
		if @union_root[obj] == obj
			obj
		else
			find(@union_root[obj])
		end
	end

	def union(obj,targ)
		if issame(obj,targ)
			return
		end
		if size(obj) > size(targ)
			@union_size[find(obj)] += size(find(targ))
			@union_root[targ] = find(obj)
		else
			@union_size[find(targ)] += size(find(obj))
			@union_root[obj] = find(targ)
		end
	end

	def issame(obj,targ)
		find(obj) == find(targ)
	end

	def size(obj)
		@union_size[find(obj)]
	end
end

n,m = gets.chomp.split(" ").map(&:to_i)

uf = UnionFind.new((1..n).to_a)

m.times do
  n1,n2 = gets.chomp.split(" ").map(&:to_i)
  uf.union(n1,n2)
end

max = 0

n.times do |i|
  sz = uf.size(i+1)
  #p sz
  if max < sz
    max = sz
  end
end

p max