io = DATA.eof? ? STDIN : DATA
n,m=io.gets.split.map(&:to_i)
ab=m.times.map{io.gets.split.map(&:to_i)}
class UnionFind
  attr_reader :parent, :size
  def initialize(n)
    @parent = Array.new(n+1){|i|i}
    @size = Array.new(n+1,1)
  end
  def root(x)
    return x if @parent[x] == x
    @parent[x] = root(@parent[x])
  end
  def merge(x,y)
    x,y = root(x),root(y)
    return if x==y
    x,y = y,x if @size[x] < @size[y]
    @size[x] += @size[y]
    @parent[y] = x
  end
  def same(x,y)
    root(x) == root(y)
  end
  def size(x)
    @size[root(x)]
  end
end
uf = UnionFind.new(n)
ab.each {|a,b|uf.merge(a,b)}
puts (1..n).map{|k| uf.size(k)}.max

__END__
