#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
int n, m, cnt;
vector<vector<int>> g;
vector<int> u;
int dfs(int v) {
  u[v] = 1;
  int res = 1;
  for (int i : g[v])
    if (!u[i])
      res += dfs(i);
  return res;
}
int main() {
  cin >> n >> m;
  g.resize(n);
  u.resize(n);
  for (int i = 0; i < m; ++i) {
    int a, b;
    cin >> a >> b;
    a--, b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  for (int i = 0; i < n; ++i)
    if (!u[i]) {
      cnt = max(cnt, dfs(i));
    }
  cout << cnt;
}