#include <bits/stdc++.h>
using namespace std;
const int N = 10;
int n, m;
int l[N * N], r[N * N];
int color[N];
int ans = 0;
int vis[N][N];
void dfs(int pos) {
  if (pos == n + 1) {
    int tmp = 0;
    memset(vis, 0, sizeof(vis));
    for (int i = 1; i <= m; i++) {
      int u = color[l[i]];
      int v = color[r[i]];
      if (vis[u][v] == 0 && u > 0 && v > 0) {
        tmp++;
        vis[u][v] = vis[v][u] = 1;
      }
    }
    ans = max(ans, tmp);
    return;
  }
  for (int i = 1; i <= 6; i++) {
    color[pos] = i;
    dfs(pos + 1);
  }
}
int main() {
  memset(color, 0, sizeof(color));
  cin >> n >> m;
  for (int i = 1; i <= m; i++) cin >> l[i] >> r[i];
  dfs(1);
  cout << ans << endl;
  return 0;
}
