#include <bits/stdc++.h>
using namespace std;
const long double inf = 1e18;
const int MOD = (int)(1e9 + 7);
const double EPS = 1e-6;
void file_io(string inp = "input.txt", string out = "output.txt",
             bool debug = false) {
  freopen(inp.c_str(), "r", stdin);
  if (!debug) freopen(out.c_str(), "w", stdout);
}
void fast_io() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
vector<pair<int, int>> edges;
int n;
int check(vector<int>& clr) {
  map<pair<int, int>, int> domino;
  for (int i = 0; i < 7; ++i)
    for (int j = i; j < 7; ++j) domino[{i, j}] = 1;
  vector<pair<int, int>> e;
  for (int i = 0; i < edges.size(); ++i) {
    pair<int, int> u = edges[i];
    e.push_back({clr[u.first], clr[u.second]});
    if (e[i].first > e[i].second) swap(e[i].first, e[i].second);
  }
  int res = 0;
  for (int i = 0; i < e.size(); ++i) {
    if (domino[e[i]]) {
      res++;
      domino[e[i]] = 0;
    }
  }
  return res;
}
int solve(vector<int>& clr) {
  int res = 0;
  if (clr.size() == n) {
    return check(clr);
  }
  for (int i = 0; i < 6; ++i) {
    clr.push_back(i);
    res = max(res, solve(clr));
    clr.pop_back();
  }
  return res;
}
int32_t main() {
  int m;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    u -= 1, v -= 1;
    edges.push_back({u, v});
  }
  vector<int> clr(0, 0);
  int res = solve(clr);
  cout << res << "\n";
  return 0;
}
