N,M,*P = $<.read.split.map &:to_i
A = (0..N).map {[]}
P.each_slice(2) {|a,b|  A[a] << b; A[b] << a }
1.upto(N) {|i|
  next  if (a=A[i]).frozen?
  A[i] = i
  while j = a.pop
    next  if (b=A[j]).frozen?
    a.concat b
    A[j] = i
  end
}
p A.tally.values.max