#include <bits/stdc++.h>
using namespace std;
pair<int, int> p[21];
int n, m;
int a[7];
bool d[6][6];
int ans(int ind) {
  if (ind == n) {
    int res = 0;
    for (int i = 0; i < m; ++i) {
      int f = min(a[p[i].first], a[p[i].second]),
          s = max(a[p[i].first], a[p[i].second]);
      if (f != 6 && s != 6 && !d[f][s]) {
        ++res;
        d[f][s] = true;
      }
    }
    for (int i = 0; i < 6; ++i) {
      for (int j = 0; j < 6; ++j) {
        d[i][j] = false;
      }
    }
    return res;
  }
  int maxi = 0;
  for (int i = 0; i < 7; ++i) {
    a[ind] = i;
    maxi = max(maxi, ans(ind + 1));
  }
  return maxi;
}
int main() {
  cin >> n >> m;
  int ai, bi;
  for (int i = 0; i < m; ++i) {
    cin >> ai >> bi;
    p[i].first = ai - 1;
    p[i].second = bi - 1;
  }
  for (int i = 0; i < 6; ++i) {
    for (int j = 0; j < 6; ++j) {
      d[i][j] = false;
    }
  }
  cout << ans(0);
  return 0;
}
