#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000 * 1000 * 1000 + 7;
const long long INF = (long long)8 * 1000 * 1000 * 1000 + 200;
const long long MAXN = 1000 * 1000 + 10;
const long long MLOG = 80;
const long long NMAX = 20;
signed main() {
  ios_base::sync_with_stdio(false);
  ;
  long long n, m;
  cin >> n >> m;
  if (n < 7)
    cout << m;
  else {
    vector<pair<long long, long long>> e;
    long long mx = 0;
    long long aa, b;
    while (m--) cin >> aa >> b, e.push_back({aa - 1, b - 1});
    long long a[7] = {};
    for (a[0] = (long long)0; a[0] < (long long)6; a[0]++)
      for (a[1] = (long long)0; a[1] < (long long)6; a[1]++)
        for (a[2] = (long long)0; a[2] < (long long)6; a[2]++)
          for (a[3] = (long long)0; a[3] < (long long)6; a[3]++)
            for (a[4] = (long long)0; a[4] < (long long)6; a[4]++)
              for (a[5] = (long long)0; a[5] < (long long)6; a[5]++)
                for (a[6] = (long long)0; a[6] < (long long)6; a[6]++) {
                  map<pair<long long, long long>, long long> mmp;
                  for (long long i = 0; i < (long long)(e.size()); i++) {
                    mmp[{max(a[e[i].first], a[e[i].second]),
                         min(a[e[i].first], a[e[i].second])}]++;
                  }
                  mx = max(mx, (long long)(mmp.size()));
                  if ((long long)(mmp.size()) == 21) {
                    for (auto i : mmp)
                      cout << i.first.first << '-' << i.first.second << ' ';
                    cout << endl;
                  }
                }
    cout << mx;
  }
}
