#include <bits/stdc++.h>
using namespace std;
int n;
bool next_n(vector<int> &a) {
  int i = n - 1;
  for (; i >= 0 && a[i] == 5; --i) {
    a[i] = 0;
  }
  if (i == -1) {
    return false;
  }
  ++a[i];
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int m;
  cin >> n >> m;
  vector<vector<int>> graph(n);
  int from, to;
  for (int i = 0; i < m; ++i) {
    cin >> from >> to;
    --from;
    --to;
    graph[from].push_back(to);
    graph[to].push_back(from);
  }
  vector<int> ns(n);
  int answ = 0;
  do {
    set<pair<int, int>> ps;
    for (int i = 0; i < n; ++i) {
      for (int j : graph[i]) {
        int a = ns[i];
        int b = ns[j];
        if (a > b) {
          swap(a, b);
        }
        ps.emplace(a, b);
      }
    }
    answ = max(answ, (int)ps.size());
  } while (next_n(ns));
  cout << answ;
  return 0;
}
