#include <bits/stdc++.h>
using namespace std;
const long long int MD = 1e9 + 7;
const int MAX = 2750131;
const double ep = 1.19209e-07;
const int lg = 20;
const int K = 1e6 + 10;
const int N = 7;
int vis[70], taken[8000];
map<long long int, int> fr;
int n, m, flag[8], mx = -1e9;
vector<vector<int> > g;
int check() {
  int ans = 0;
  map<pair<int, int>, bool> take;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < g[i].size(); j++) {
      int child = g[i][j];
      if (!take[make_pair(flag[i], flag[child])]) {
        take[make_pair(flag[i], flag[child])] = 1;
        take[make_pair(flag[child], flag[i])] = 1;
        ans++;
      }
    }
  }
  return ans;
}
void calc(int node) {
  if (node == (n + 1)) {
    mx = max(mx, check());
    return;
  }
  for (int i = 1; i <= 6; i++) {
    flag[node] = i;
    calc(node + 1);
  }
}
int main() {
  cin >> n >> m;
  g.resize(n + 10);
  for (int i = 0; i < m; i++) {
    int from, to;
    cin >> from >> to;
    g[from].push_back(to);
    g[to].push_back(from);
  }
  calc(1);
  cout << mx << endl;
  return 0;
}
