#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int MAXN = 10, INF = 1e9, MAXM = 30;
int n, m;
int ans = 0;
int used[MAXN][MAXN], c[MAXN];
pair<int, int> e[MAXM];
void check() {
  int cnt = 0;
  for (int i = 0; i < m; ++i) {
    if (used[c[e[i].first]][c[e[i].second]]) continue;
    used[c[e[i].first]][c[e[i].second]] = used[c[e[i].second]][c[e[i].first]] =
        1;
    ++cnt;
  }
  for (int i = 0; i < MAXN; ++i)
    for (int j = 0; j < MAXN; ++j) used[i][j] = 0;
  ans = max(ans, cnt);
}
void kek(int i) {
  if (i == n) {
    check();
    return;
  }
  for (int j = 1; j <= 6; ++j) {
    c[i] = j;
    kek(i + 1);
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    cin >> e[i].first >> e[i].second;
    e[i].first--;
    e[i].second--;
  }
  kek(0);
  cout << ans;
  return 0;
}
