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

arr = []
hash = {0=>1}

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

  tmp = a
  a_ind = arr[a]
  while tmp != a_ind
    tmp = a_ind
    a_ind = arr[a_ind]
  end

  tmp = b
  b_ind = arr[b]
  while tmp != b_ind
    tmp = b_ind
    b_ind = arr[b_ind]
  end
  
  min_ind = [a_ind, b_ind].min
  arr[a] = min_ind
  arr[b] = min_ind
  next if a_ind == b_ind

  sum = hash[a_ind] + hash[b_ind]
  hash[a_ind] = sum
end

puts hash.values.max
