#include <bits/stdc++.h>
using namespace std;
long long n, m, anw, cd, ck[30], eck[7][7];
vector<long long> g[30], b;
string second;
void dfs(long long a) {
  ck[a] = 1;
  for (int i = 0; i < g[a].size(); i++)
    if (!ck[g[a][i]]) {
      if (min(b[a], b[g[a][i]]) != 0 &&
          !eck[max(b[a], b[g[a][i]])][min(b[a], b[g[a][i]])])
        cd++, eck[max(b[a], b[g[a][i]])][min(b[a], b[g[a][i]])] = 1;
    }
  for (int i = 0; i < g[a].size(); i++)
    if (!ck[g[a][i]]) dfs(g[a][i]);
}
void get(long long a) {
  if (a == n + 1) {
    cd = 0;
    memset(ck, 0, sizeof(ck));
    memset(eck, 0, sizeof(eck));
    for (int i = 1; i <= n; i++)
      if (!ck[i]) dfs(i);
    anw = max(anw, cd);
    return;
  }
  for (int j = 0; j <= 6; j++) {
    b[a] = j;
    get(a + 1);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    long long c, d;
    cin >> c >> d;
    g[c].push_back(d), g[d].push_back(c);
  }
  for (int i = 0; i <= n; i++) b.push_back(0);
  get(1);
  cout << anw;
  return 0;
}
