#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n = 0, m = 0;
  cin >> n >> m;
  vector<pair<int, int> > edges(m);
  for (int i = 0; i < m; i++) {
    cin >> edges[i].first >> edges[i].second;
    edges[i].first--;
    edges[i].second--;
  }
  int total = 1;
  for (int i = 0; i < n; i++) {
    total *= 7;
  }
  int ans = 0;
  for (int i = 0; i < total; i++) {
    vector<int> numbers(n);
    vector<bool> dominos(21);
    int x = i;
    for (int j = 0; j < n; j++) {
      numbers[j] = x % 7;
      x /= 7;
    }
    for (int j = 0; j < m; j++) {
      int y = numbers[edges[j].first];
      int z = numbers[edges[j].second];
      if (!y || !z) {
        continue;
      }
      if (y > z) {
        swap(y, z);
      }
      dominos[((y - 1) * (14 - y)) / 2 + (z - y)] = true;
    }
    int curr = 0;
    for (int i = 0; i < 21; i++) {
      if (dominos[i]) {
        curr++;
      }
    }
    ans = max(ans, curr);
  }
  cout << ans << endl;
  return 0;
}
