#include <bits/stdc++.h>
using namespace std;
int n, A[6], m;
int ck[6][6];
vector<int> V[7];
int main() {
  cin >> n >> m;
  for (int i = 0, a, b; i < m; i++) {
    cin >> a >> b;
    V[a - 1].push_back(b - 1);
    V[b - 1].push_back(a - 1);
  }
  int i = 0;
  int ma = 1;
  for (int i = 0; i < n; i++) {
    ma *= 6;
  }
  int ans = 0;
  for (int i = 0; i < ma; i++) {
    int ii = i;
    for (int j = 0; j < 7; j++) {
      for (int k = 0; k < 7; k++) {
        ck[j][k] = 0;
      }
    }
    for (int j = 0; j < n; j++) {
      A[j] = ii % 6;
      ii /= 6;
    }
    for (int j = 0; j < n; j++) {
      for (int k : V[j]) {
        ck[min(A[j], A[k])][max(A[j], A[k])] = 1;
      }
    }
    int sum = 0;
    for (int j = 0; j < 6; j++) {
      for (int k = 0; k < 6; k++) {
        sum += ck[j][k];
      }
    }
    ans = max(ans, sum);
  }
  cout << ans;
}
