#include <bits/stdc++.h>
using namespace std;
int p[7];
pair<int, int> e[30];
int n, m, ans = 0;
bool vis[7][7];
void dfs(int x) {
  if (x > n) {
    memset(vis, 0, sizeof(vis));
    int num = 0;
    for (int i = 0; i < m; i++) {
      int a = p[e[i].first], b = p[e[i].second];
      if (a > b) swap(a, b);
      if (vis[a][b]) {
        continue;
      }
      vis[a][b] = 1;
      num++;
    }
    ans = max(ans, num);
    return;
  }
  for (int i = 1; i <= 6; i++) {
    p[x] = i;
    dfs(x + 1);
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    e[i] = {u, v};
  }
  dfs(1);
  cout << ans;
}
