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

if m == 0
  puts 1
  return
end

arr = []
hash = {}

m.times do
  a, b = gets.split(" ").map(&:to_i)
  if arr[a].nil?
    hash[a] = 1
    arr[a] = a
  end
  if arr[b].nil?
    hash[b] = 1
    arr[b] = b
  end
  next if arr[a] == arr[b]

  a_ind = arr[a]
  b_ind = arr[b]
  sum = hash[a_ind] + hash[b_ind]
  hash[a_ind] = sum
  hash.delete(b_ind)
  arr[b] = a_ind
end

puts hash.values.max
