#include <bits/stdc++.h>
using namespace std;
int n, m;
int dis[10][10];
int k[10], used[10][10];
int ans;
void check() {
  int tmp = 0;
  memset(used, 0, sizeof(used));
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      if (!dis[i][j]) continue;
      int A = min(k[i], k[j]);
      int B = max(k[i], k[j]);
      if (!used[A][B]) {
        used[A][B] = 1;
        tmp++;
      }
    }
  }
  ans = max(ans, tmp);
}
void dfs(int dep) {
  if (dep > n) {
    check();
    return;
  }
  for (int i = 1; i <= 6; i++) {
    k[dep] = i;
    dfs(dep + 1);
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int a, b;
    cin >> a >> b;
    dis[a][b] = 1;
    dis[b][a] = 1;
  }
  dfs(1);
  cout << ans << endl;
  return 0;
}
