class UnionFind
  def initialize(n)
    @n = n
    @par = Array.new(@n, -1)
  end
  def find(x)
    @par[x] < 0 ? x : @par[x] = find(@par[x])
  end
  def union(a, b)
    pa, pb = find(a), find(b)
    return if pa == pb
    if pa < pb then
      @par[pa] += @par[pb]
      @par[pb] = pa
    else
      @par[pb] += @par[pa]
      @par[pa] = pb
    end
  end
  def max_size
    -@par.min
  end
  def show
    p @par
  end
end

N, M = gets.chomp.split(" ").map(&:to_i)
uf = UnionFind.new(N)
(0...M).map{
  a, b = gets.chomp.split(" ").map(&:to_i)
  uf.union(a-1, b-1)
}

puts uf.max_size
