#include <bits/stdc++.h>
using namespace std;
int n, m, ans;
int G[10][10];
int p[10];
bool vis[10][10];
void dfs(int cur) {
  if (cur > n) {
    memset(vis, 0, sizeof(vis));
    int cnt = 0;
    for (int i = 1; i <= n; i++) {
      for (int j = i + 1; j <= n; j++) {
        if (!G[i][j]) continue;
        int u = p[i];
        int v = p[j];
        if (!vis[u][v]) {
          vis[u][v] = vis[v][u] = true;
          cnt++;
        }
      }
    }
    ans = max(ans, cnt);
    return;
  }
  for (int i = 1; i <= 6; i++) {
    p[cur] = i;
    dfs(cur + 1);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u][v] = G[v][u] = 1;
  }
  dfs(1);
  printf("%d\n", ans);
  return 0;
}
