'use strict'

const main = (input) => {

  const lines = input.split('\n');
  const [n, m] = lines[0].split(' ').map(e => parseInt(e));
  const pairs = lines.slice(1, 1 + m).map(line => line.split(' ').map(e => parseInt(e)));
  
  const parent = Array.from({length: n}).fill(-1);
  
  function union(a, b) {
      const fa = find(a);
      const fb = find(b);
      // console.log({a,b,fa,fb});
      if (fa === fb) {
          return;
      }
      if (fa === b) {
          return;
      }
      if (fb === a) {
          return;
      }
      
      if (parent[fa] < parent[fb]) {
          parent[fa] += parent[fb];
          parent[fb] = fa;
      } else {
          parent[fb] += parent[fa];
          parent[fa] = fb;
      }
  }
  
  function find(a) {
      if (parent[a] < 0) {
          return a;
      }
      
      const result = find(parent[a]);
      parent[a] = result;
      
      return result;
  }

  for (const pair of pairs) {
      union(pair[0] - 1, pair[1] - 1);
  }

  let result = 0;
  const map = {};
  for (let i = 0; i < n; ++i) {
      if (find(i) in map) {
          map[find(i)] += 1;
      } else {
          map[find(i)] = 1;
      }
  }
  for (const key in map) {
      result = Math.max(result, map[key]);
  }
  // console.log(parent);
  
  console.log(result);
};



main(require('fs').readFileSync('/dev/stdin', 'utf-8'))