#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<vector<int>> g;
int ans = 0;
void k(vector<int> mas, int n_, int ind) {
  if (ind == n_) {
    set<pair<int, int>> s;
    for (int i = 0; i < n; i++) {
      for (auto to : g[i]) {
        int minn = min(mas[i], mas[to]);
        int maxx = max(mas[i], mas[to]);
        s.insert(make_pair(minn, maxx));
      }
    }
    ans = max(ans, (int)s.size());
    return;
  }
  for (int i = 1; i <= 6; i++) {
    mas.push_back(i);
    k(mas, n_, ind + 1);
    mas.pop_back();
  }
}
int main() {
  cin >> n >> m;
  g.resize(n);
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    a--, b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  vector<int> mas;
  k(mas, n, 0);
  cout << ans;
}
