#include <bits/stdc++.h>
using namespace std;
int nxt() {
  int ret;
  scanf("%d", &ret);
  return ret;
}
const int maxn = 10;
vector<pair<int, int> > q;
bool vis[maxn][maxn];
int face[maxn], n, m, ans;
void update() {
  int val = 0;
  memset(vis, 0, sizeof(vis));
  for (auto i : q) {
    int u = face[i.first], v = face[i.second];
    if (u > v) swap(u, v);
    if (!vis[u][v]) {
      val++;
      vis[u][v] = 1;
    }
  }
  ans = max(ans, val);
}
void dfs(int cur) {
  if (cur == n + 1) {
    update();
    return;
  }
  for (int i = (1); i <= (6); ++i) {
    face[cur] = i;
    dfs(cur + 1);
  }
}
signed main() {
  n = nxt(), m = nxt();
  for (int i = (1); i <= (m); ++i) {
    int u = nxt(), v = nxt();
    q.emplace_back((pair<int, int>){min(u, v), max(u, v)});
  }
  dfs(1);
  cout << ans << endl;
}
