#include <bits/stdc++.h>
using namespace std;
template <class T, class U>
T max(T &a, U &b) {
  if (a > b) return a;
  return b;
}
template <class T, class U>
T min(T &a, U &b) {
  if (a < b) return a;
  return b;
}
template <class T, class U>
void maximize(T &a, U &b) {
  a = max(a, b);
}
template <class T, class U>
void minimize(T &a, U &b) {
  a = min(a, b);
}
int col[1000];
bool dom[10][10];
int n, m;
int cur, ans;
bool e[110][110];
void backtrack(int u) {
  if (u == n) {
    int cur = 0;
    memset(dom, 0, sizeof dom);
    for (int i = 1; i <= n; ++i)
      if (col[i])
        for (int j = 1; j <= n; ++j)
          if (e[i][j] && col[j]) {
            if (dom[col[i]][col[j]] == true) continue;
            dom[col[i]][col[j]] = dom[col[j]][col[i]] = true;
            cur++;
          }
    ans = max(ans, cur);
    return;
  }
  for (int i = 0; i <= 6; ++i) {
    col[u + 1] = i;
    backtrack(u + 1);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 0; i <= (int)m - 1; ++i) {
    int u, v;
    cin >> u >> v;
    e[u][v] = e[v][u] = true;
  }
  backtrack(0);
  cout << ans;
  return 0;
}
