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
  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
  arr[a] = a_ind

  tmp = b
  b_ind = arr[b]
  while tmp != b_ind
    tmp = b_ind
    b_ind = arr[b_ind]
  end
  
  if a_ind == b_ind
    arr[b] = a_ind
    next
  end

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

puts hash.values.max
