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

if m == 0
  puts 1
  return
end

arr = []
hash = {}

m.times do
  na, nb = gets.split(" ").map(&:to_i)
  a = [na, nb].min
  b = [na, nb].max
  hash[a] ||= [1]
  hash[b] ||= [1]
  next if hash[a].object_id == hash[b].object_id

  hash[a][0] += hash[b][0]
  hash[b] = hash[a]
end

puts hash.values.max
