#include <bits/stdc++.h>
using namespace std;
const long long N = 9, M = 29;
struct Edge {
  long long u, v;
} E[M];
long long n, m, ans = 0;
long long a[N];
bool vis[N][N];
template <typename T>
inline void read(T &x) {
  x = 0;
  T w = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') w = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 3) + (x << 1) + c - '0';
    c = getchar();
  }
  x *= w;
}
void dfs(long long k) {
  if (k == n) {
    memset(vis, 0, sizeof(vis));
    long long s = 0;
    for (long long i = 1; i <= m; ++i) {
      long long u = E[i].u, v = E[i].v;
      u = a[u];
      v = a[v];
      if (u > v) swap(u, v);
      if (u && v) {
        if (!vis[u][v]) ++s;
        vis[u][v] = 1;
      }
    }
    ans = max(ans, s);
    return;
  }
  for (long long i = 0; i <= 6; ++i) {
    a[k + 1] = i;
    dfs(k + 1);
  }
}
int main() {
  read(n);
  read(m);
  for (long long i = 1; i <= m; ++i) {
    read(E[i].u);
    read(E[i].v);
  }
  dfs(0);
  printf("%I64d", ans);
  return 0;
}
