function Main(input) {
  const lines = input.split('\n');
  const [N, M] = lines[0].split(' ').map(i => parseInt(i));
  const R = lines.splice(1, M).map(r => r.split(' ').map(v => parseInt(v) - 1));
  const relmat = new Array(N).fill(0).map(_ => new Set());
  const done = new Array(N).fill(false);
  R.forEach(r => {
    l = r[0];
    r = r[1];
    relmat[l].add(r);
    relmat[r].add(l)
  });
  let queue = [];
  let max = 0;
  while (true) {
    if (done.indexOf(false) === -1) {
      break;
    } else {
      queue.push(done.indexOf(false));
    }
    let num = 0;
    while (queue.length !== 0) {
      const next = queue.shift();
      if (done[next] === false) {
        done[next] = true;
        num = num + 1;
        queue = queue.concat([...relmat[next]].filter(c => done[c] === false));
      }
    }
    if (num > max) max = num;
  }
  console.log(max);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
