#include <bits/stdc++.h>
std::ostream &out = std::cout;
std::istream &in = std::cin;
void rint(int &i) { in >> i; }
template <class... Ts>
void rint(int &i, Ts &...args) {
  in >> i;
  rint(args...);
}
using uint = unsigned;
using namespace std;
using I = int64_t;
using UI = uint64_t;
using szt = size_t;
bool g[8][8];
int8_t ns[8];
bool used[7][7];
int n, m, ma = 0;
void rec(int v) {
  if (v == n + 1) {
    int cu = 0;
    memset(used, 0, 49);
    for (int i = 1; i <= n; ++i)
      for (int j = i + 1; j <= n; ++j)
        if (g[i][j]) {
          int a = ns[i], b = ns[j];
          if (b > a) swap(a, b);
          cu += !used[a][b];
          used[a][b] = 1;
        }
    if (cu > ma) ma = cu;
    return;
  }
  for (int i = 1; i <= 6; ++i) {
    ns[v] = i;
    rec(v + 1);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  in.tie(0);
  constexpr int N = (int)3e5 + 1;
  constexpr int q = (int)1e9 + 7;
  memset(g, 0, 64);
  in >> n >> m;
  for (int i = 0; i < m; ++i) {
    int a, b;
    rint(a, b);
    g[a][b] = g[b][a] = 1;
  }
  rec(1);
  out << ma;
}
