def root(par, x)
  if par[x] < 0
    return x
  else
    par[x] = root(par, par[x])
    return par[x]
  end
end
def unite(par, x, y)
  rx = root(par, x)
  ry = root(par, y)
  if rx != ry
    if par[rx] > par[ry]
      rx, ry = ry, rx
    end
    par[rx] += par[ry]
    par[ry] = rx
  end
end
def size(par, x)
  return -par[root(par, x)]
end
n, m = gets.split.map(&:to_i)
par = Array.new(n, -1)
m.times do |i|
  a, b = gets.split.map(&:to_i)
  a -= 1
  b -= 1
  unite(par, a, b)
end
max_size = 1
for i in 0...n do
  max_size = [max_size, size(par, i)].max
end
puts max_size
