#include <bits/stdc++.h>
using namespace std;
int n, m, tmp, typp[100], mark[100], x[100], y[100], ans = -1;
void solve(int p) {
  if (p > n) {
    tmp = 0;
    memset(mark, 0, sizeof mark);
    for (int i = 1; i <= m; ++i) {
      int a = min(typp[x[i]], typp[y[i]]), b = max(typp[x[i]], typp[y[i]]);
      if (!mark[a * 7 + b]) ++tmp, mark[a * 7 + b] = 1;
    }
    ans = max(ans, tmp);
    return;
  }
  for (int i = 1; i < 7; ++i) typp[p] = i, solve(p + 1);
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) scanf("%d%d", &x[i], &y[i]);
  solve(1), printf("%d", ans);
  return 0;
}
