#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n, ans, G[8][8], vis[8];
vector<pair<int, int> > Edge;
void dfs(int x) {
  if (x > n) {
    int res = 0;
    for (auto tmp : Edge) {
      int u = vis[tmp.first];
      int v = vis[tmp.second];
      if (u > v) swap(u, v);
      if (!G[u][v]) res++, G[u][v] = 1;
    }
    ans = max(ans, res);
    for (auto tmp : Edge) {
      int u = vis[tmp.first];
      int v = vis[tmp.second];
      if (u > v) swap(u, v);
      G[u][v] = 0;
    }
    return;
  }
  for (int i = 1; i <= 6; i++) {
    vis[x] = i;
    dfs(x + 1);
  }
}
int main() {
  int u, v, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &u, &v);
    Edge.push_back(make_pair(u, v));
  }
  dfs(1);
  printf("%d\n", ans);
}
