console.log((args=>{
  const [[N,M],...friend] = args.trim().split`\n`.map(r=>r.split` `.map(v=>v|0));
  const G = Array.from({length:N},_=>[]);
  for ( const [A,B] of friend ) {
    G[A-1].push(B-1);
    G[B-1].push(A-1);
  }
  const g = Array(N).fill(0);
  let n = 1;
  for ( let i = 0; i < N; i++ ) {
    if ( g[i] ) continue;
    let stack = [i], m = 0;
    while( stack.length ) {
      const p = stack.pop();
      if ( !g[p] ) {
        g[p] = i+1;
        m++;
        for ( const next of G[p] ) if ( !g[next] ) {
          stack.push(next);
        }
      }
    }
    if (m > n) n = m;
  }
  return n;
})(require('fs').readFileSync('/dev/stdin','utf8')));
