#include <bits/stdc++.h>
using namespace std;
int n, m;
int edges[10][10];
int col[10];
int ans = 0;
int vis[10][10];
void solve() {
  memset(vis, 0, sizeof(vis));
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (!edges[i][j]) continue;
      int a = col[i];
      int b = col[j];
      if (a > b) swap(a, b);
      if (!vis[a][b]) {
        vis[a][b] = 1;
        cnt++;
      }
    }
  }
  ans = max(ans, cnt);
}
void dfs(int x) {
  if (x == n + 1) {
    solve();
    return;
  }
  for (int i = 1; i <= 6; i++) {
    col[x] = i;
    dfs(x + 1);
  }
}
int main() {
  cin >> n >> m;
  memset(edges, 0, sizeof(edges));
  for (int i = 1, a, b; i <= m; i++) {
    cin >> a >> b;
    edges[a][b] = 1;
  }
  dfs(1);
  cout << ans << endl;
  return 0;
}
