#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> Adj[8];
int Number[8];
int mark[8];
int result = 0;
int cur = 0, cnt = 0;
int mp[8][8];
int color[8];
void Init() {
  for (int i = 0; i < 8; i++) color[i] = 0;
  for (int i = 0; i < 8; i++)
    for (int j = 0; j < 8; j++) mp[i][j] = 0;
  cur = 0;
}
void DFS(int s) {
  color[s] = 1;
  for (int i = 0; i < Adj[s].size(); i++) {
    cnt++;
    int t = Adj[s][i];
    int colors = Number[s], colort = Number[t];
    if (mp[colors][colort] == 0 && colors != 0 && colort != 0) {
      cur++;
      mp[colors][colort] = 1;
      mp[colort][colors] = 1;
    }
    if (!color[t]) DFS(t);
  }
}
void Back_track(int idx) {
  if (idx > n) {
    Init();
    for (int i = 1; i <= n; i++) DFS(i);
    result = max(result, cur);
    return;
  }
  for (int i = 0; i <= 6; i++) {
    Number[idx] = i;
    Back_track(idx + 1);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int a, b;
    cin >> a >> b;
    Adj[a].push_back(b);
    Adj[b].push_back(a);
  }
  Back_track(1);
  cout << result;
}
