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

$roots = (0...n).map {|i| i }
$counts = (0...n).map { 1 }

def root(i)
  return i if $roots[i] == i
  r = root($roots[i])
  $roots[i] = r
  r
end

def unite(i, j)
  ri = root(i)
  rj = root(j)
  return if ri == rj
  $roots[rj] = ri
  $counts[ri] += $counts[rj]
end

m.times do |i|
  a, b = gets.split(' ').map(&:to_i)
  a -= 1
  b -= 1
  unite(a, b)
end

puts $counts.max
