a = gets.split(' ')
n = a[0].to_i
m = a[1].to_i

$rr = Array.new(n) {|i| i}
def get_root(u) 
  if u == $rr[u]
    return u 
  else
    return $rr[u] = get_root($rr[u])
  end
end

def merge_root(u, v)
  x = get_root(u)
  y = get_root(v)
  # p x, y
  if (x == y) 
    return 0
  end
  $rr[x] = y
end

m.times do
  a = gets.split(' ')
  u = a[0].to_i - 1
  v = a[1].to_i - 1
  merge_root(u, v)
end

$h = Hash.new
n.times do |i|
  $h.has_key?(get_root(i)) ? $h[get_root(i)] += 1 : $h[get_root(i)] = 1
end

ans = 0
$h.each do |k, v|
  if (v > ans) 
    ans = v
  end
end
puts(ans)