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

tree = Array.new(n, -1)

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}
  a_root = getRoot(tree, a)
  b_root = getRoot(tree, b)
  next if a_root == b_root
  tree[a_root] += tree[b_root]
  tree[b] = a_root
end

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

puts max == 0 ? 1 : max
