#include <bits/stdc++.h>
using namespace std;
const long long N = 10, M = 110;
long long n, m, ans, a[N], x[M], y[M], b[N][N];
inline long long read() {
  long long x = 0, tmp = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') tmp = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return tmp * x;
}
inline long long check() {
  memset(b, 0, sizeof(b));
  long long ans = 0;
  for (long long i = 1; i <= m; i++) {
    if (!b[a[x[i]]][a[y[i]]]) {
      b[a[x[i]]][a[y[i]]] = b[a[y[i]]][a[x[i]]] = 1;
      ans++;
    }
  }
  return ans;
}
void dfs(long long x) {
  if (x == n + 1) {
    ans = max(ans, check());
    return;
  }
  for (long long i = 1; i <= 6; i++) {
    a[x] = i;
    dfs(x + 1);
  }
}
int main() {
  n = read();
  m = read();
  for (long long i = 1; i <= m; i++) {
    x[i] = read();
    y[i] = read();
  }
  dfs(1);
  cout << ans << endl;
  return 0;
}
