n, m = gets.split.map(&:to_i)
edges = []
m.times { edges << gets.chomp.split.map(&:to_i) }
graph = Array.new(n + 1) { Array.new }
edges.each do |from, to|
  graph[from] << to
  graph[to] << from
end
belongs_to = Array.new(n)
n.times do |from|
  next if belongs_to[from]
  belongs_to[from] = from
  queue = [from]
  until queue.empty?
    current = queue.shift
    graph[current].each do |to|
      next if belongs_to[to]
      belongs_to[to] = from
    end
  end
end
puts belongs_to.tally.values.max
