#include <bits/stdc++.h>
using namespace std;
const int N = 8;
int n, m, sum, f[N], fl[N][N], fq[N][N];
inline int read() {
  long long num = 0;
  char g = getchar();
  while (g < 48 || 57 < g) g = getchar();
  while (47 < g && g < 58)
    num = (num << 1) + (num << 3) + g - 48, g = getchar();
  return num;
}
inline void dfs(int u) {
  if (u == n + 1) {
    int ans = 0;
    for (int i = 1; i <= 6; i++)
      for (int j = 1; j <= 6; j++) fq[i][j] = 1;
    for (int i = 1; i <= n; i++)
      for (int j = i + 1; j <= n; j++)
        if (fl[i][j]) {
          int u = f[i], v = f[j];
          if (u > v) swap(u, v);
          if (fq[u][v]) fq[u][v] = 0, ans++;
        }
    sum = max(ans, sum);
    return;
  }
  for (int i = 1; i <= 6; i++) f[u] = i, dfs(u + 1);
}
int main() {
  cin >> n >> m;
  int u, t;
  for (int i = 1; i <= m; i++) u = read(), t = read(), fl[u][t] = fl[t][u] = 1;
  dfs(1);
  cout << sum << endl;
  return 0;
}
