input = readlines()
n, m = input.shift.chomp.split("\s").map{|x| x.to_i}

tree = Array.new(n, -1)
child_root = {}

def getRoot(tree, target)
  while(tree[target] > -1)
    target = tree[target]
  end

  target
end

input.each do |l|
  a, b = l.chomp.split("\s").map{|x| x.to_i - 1}.sort
  # a_root = getRoot(tree, a)
  # b_root = getRoot(tree, b)
  a_root = child_root[a].nil? ? a : child_root[a]
  b_root = child_root[b].nil? ? b : child_root[b]
  next if a_root == b_root

  tree[a_root] += tree[b_root]
  tree[b_root] = a_root

  child_root[b] = a_root
end

max = 0
tree.each do |v|
  next if v > -1
  size = v * -1
  max = size if max < size
end

puts max
