#include <bits/stdc++.h>
using namespace std;
int node[10];
pair<int, int> edge[30];
int cnt[10];
int ans;
int n, m;
void Dfs(int step) {
  if (step > n) {
    memset(cnt, 0, sizeof(cnt));
    map<pair<int, int>, bool> Use;
    int tmp = 0;
    for (int i = 1; i <= m; i++) {
      int l = edge[i].first, r = edge[i].second;
      int vl = node[edge[i].first], vr = node[edge[i].second];
      if (vl == 0 || vr == 0) continue;
      if (vl > vr) swap(vl, vr);
      if (Use[make_pair(vl, vr)]) continue;
      tmp++;
      Use[make_pair(vl, vr)] = true;
    }
    ans = max(ans, tmp);
    return;
  }
  for (int i = 0; i <= 6; i++) {
    node[step] = i;
    Dfs(step + 1);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  int u, v;
  for (int i = 1; i <= m; i++) {
    cin >> u >> v;
    edge[i].first = u;
    edge[i].second = v;
  }
  Dfs(1);
  cout << ans << endl;
  return 0;
}
