#include <bits/stdc++.h>
using namespace std;
int const maxn = 100 + 10;
const int INF = 0x3f3f3f3f;
const long long INFL = 0x3f3f3f3f3f3f3f3f;
inline int lc(int x) { return x << 1; }
inline int rc(int x) { return x << 1 | 1; }
int n, m, ans;
int e[maxn][maxn];
int p[maxn];
int vis[maxn][maxn];
void dfs(int u) {
  if (u > n) {
    int x = 0;
    memset(vis, 0, sizeof(vis));
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (!e[i][j]) continue;
        if (!vis[p[i]][p[j]]) {
          x++;
          vis[p[i]][p[j]] = 1;
          vis[p[j]][p[i]] = 1;
        }
      }
    }
    ans = max(ans, x);
    return;
  }
  for (int i = 1; i <= 6; i++) {
    p[u] = i;
    dfs(u + 1);
  }
}
int main(void) {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    e[u][v] = e[v][u] = 1;
  }
  dfs(1);
  cout << ans << endl;
  return 0;
}
