def find(parent, i)
  t = parent[i]
  return i if t < 0
  t = find(parent, t)
  parent[i] = t
end

def unite(parent, i, j)
  i = find(parent, i)
  j = find(parent, j)
  return if i == j
  parent[j] += parent[i]
  parent[i] = j
end

n, m = gets.split.map(&:to_i)
parent = [-1] * n
m.times do
  a, b = gets.split.map{ |e| e.to_i - 1 }
  unite(parent, a, b)
end
puts -parent.min