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[b_root] = a_root
end

max = 0
cnt = {}
(1..n).each do |x|
  root = getRoot(tree, x - 1)
  cnt[root] = 0 if cnt[root].nil?
  cnt[root] += 1
end

puts cnt.values.max
