#include <bits/stdc++.h>
using namespace std;
long long int n, m;
long long int adj[9][9], deg[9], dom[10][10];
long long int res, sol = 0;
void solve(long long int i) {
  if (i == n + 1) {
    res = 0;
    memset(dom, 0, sizeof(dom));
    for (long long int j = 1; j <= n; j++) {
      for (long long int k = 1; k <= n; k++) {
        if (adj[j][k]) {
          long long int x = deg[j];
          long long int y = deg[k];
          if (x > y) swap(x, y);
          if (!dom[x][y]) dom[x][y] = 1;
        }
      }
    }
    for (long long int j = 1; j <= 9; j++)
      for (long long int k = 1; k <= 9; k++)
        if (dom[j][k]) res++;
    sol = max(sol, res);
    return;
  } else {
    for (long long int j = 1; j <= 6; j++) {
      deg[i] = j;
      solve(i + 1);
    }
  }
}
int main() {
  cin >> n >> m;
  long long int a, b;
  memset(adj, 0, sizeof(adj));
  for (long long int i = 1; i <= m; i++) {
    cin >> a >> b;
    adj[a][b] = 1;
    adj[b][a] = 1;
  }
  solve(1);
  cout << sol;
}
