#include <bits/stdc++.h>
using namespace std;
int n, m;
int x, y;
map<int, map<int, int> > f;
int a[1100000];
int maxn = -9999999;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> x >> y;
    if (!f[x][y] && !f[y][x]) {
      f[x][y] = 1, f[y][x] = 1;
      int x1 = a[x];
      int y1 = a[y];
      a[x] += y1 + 1;
      a[y] += x1 + 1;
    }
  }
  for (int i = 1; i <= n; i++)
    if (a[i] > maxn) maxn = a[i];
  cout << maxn + 1 << endl;
}
