#include <bits/stdc++.h>
using namespace std;
const int N = 8;
int mp[N][N], color[N];
int path[N][N], ans, n, m;
void fun() {
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (mp[i][j]) path[color[i]][color[j]] = 1;
    }
  }
  int tmp = 0;
  for (int i = 1; i <= 6; i++) {
    for (int j = i; j <= 6; j++)
      if (path[i][j]) tmp++;
  }
  memset(path, 0, sizeof(path));
  ans = max(tmp, ans);
}
void dfs(int u) {
  if (u == n + 1) {
    fun();
    return;
  }
  for (int i = 1; i <= 6; i++) {
    color[u] = i;
    dfs(u + 1);
    color[u] = 0;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    mp[x][y] = mp[y][x] = 1;
  }
  dfs(1);
  printf("%d\n", ans);
  return 0;
}
