#include <bits/stdc++.h>
#pragma GCC optimize(2)
const int mod = 1000;
const int maxn = 1e2 + 5;
const long long INF = 10000000000000005;
using namespace std;
long long n, m, p;
struct node {
  int s, e;
} save[maxn];
int vis[maxn];
int mp[8][8];
long long ans = -1;
void dfs(int st) {
  if (st > n) {
    long long temp = 0;
    for (int i = 1; i <= m; i++) {
      int s = save[i].s, e = save[i].e;
      if (!mp[vis[s]][vis[e]] && !mp[vis[e]][vis[s]]) {
        mp[vis[s]][vis[e]] = mp[vis[e]][vis[s]] = 1;
        temp++;
      }
    }
    memset(mp, 0, sizeof(mp));
    ans = max(ans, temp);
    return;
  }
  for (int i = 1; i <= 6; i++) {
    vis[st] = i;
    dfs(st + 1);
  }
}
int main() {
  memset(mp, 0, sizeof(mp));
  scanf("%lld%lld", &n, &m);
  for (int i = 1; i <= m; i++) scanf("%d%d", &save[i].s, &save[i].e);
  dfs(1);
  printf("%lld\n", ans);
}
