#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long s = 0, w = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (isdigit(ch)) s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
int mp[10][10];
int col[10];
int c[10][10];
int n, m, ans = 0;
void init() {
  for (int i = 1; i <= 6; ++i)
    for (int j = i; j <= 6; ++j) c[i][j] = 1;
}
void dfs(int dep) {
  if (dep == n + 1) {
    init();
    int tmp = 0;
    for (int i = 1; i <= n; ++i) {
      for (int j = i + 1; j <= n; ++j) {
        if (mp[i][j]) {
          if (c[col[i]][col[j]]) {
            ++tmp;
            --c[col[i]][col[j]];
          }
        }
      }
    }
    ans = max(ans, tmp);
    return;
  }
  for (int i = 1; i <= 6; ++i) {
    col[dep] = i;
    dfs(dep + 1);
  }
}
int main() {
  n = read(), m = read();
  for (int i = 1; i <= m; ++i) {
    int u = read(), v = read();
    mp[u][v] = mp[v][u] = 1;
  }
  dfs(1);
  write(ans);
  putchar('\n');
  return 0;
}
