#include <bits/stdc++.h>
using namespace std;
void rd(int&);
void rdl(long long&);
const int maxn = 2000;
struct Edge {
  int u, v;
};
vector<Edge> vec;
int n, m;
bool used[100];
int arr[8];
int stk[120];
int test() {
  int ans = 0;
  memset(used, 0, sizeof(used));
  for (Edge& e : vec) {
    int u = stk[e.u];
    int v = stk[e.v];
    if (u < v) swap(v, u);
    int hs = u * 10 + v;
    if (!used[hs]) {
      used[hs] = 1;
      ans++;
    }
  }
  return ans;
}
int ans;
void gen(int step) {
  if (step > n) {
    ans = max(ans, test());
    return;
  }
  for (int i = 1; i <= 6; ++i) {
    stk[step] = i;
    gen(step + 1);
  }
}
int main() {
  int x, y;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    cin >> x >> y;
    vec.push_back(Edge{x, y});
  }
  gen(1);
  cout << ans << endl;
  return 0;
}
