#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
using V = vector<T>;
template <class T, class U>
using P = pair<T, U>;
using vll = V<ll>;
using vvll = V<vll>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const ll MOD = 1000000007;
const ll HIGHINF = (ll)1e18;
vector<vector<int> > edges;
vector<int> node;
int n, m;
vector<int> dig;
int dfs(int cnt) {
  if (cnt == n) {
    vector<int> used(50, 0);
    int ret = 0;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < edges[i].size(); j++) {
        int v = edges[i][j];
        if (!used[6 * dig[i] + dig[v]] && !used[6 * dig[v] + dig[i]]) {
          ret++;
          used[6 * dig[i] + dig[v]] = 1;
          used[6 * dig[v] + dig[i]] = 1;
        }
      }
    }
    return ret;
  } else {
    int ret = 0;
    for (int i = 1; i <= 6; i++) {
      dig[cnt] = i;
      chmax(ret, dfs(cnt + 1));
    }
    return ret;
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n >> m;
  node.resize(n);
  edges.resize(n);
  dig.resize(n);
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    edges[a - 1].push_back(b - 1);
    edges[b - 1].push_back(a - 1);
  }
  int ans = dfs(0);
  cout << ans << '\n';
  return 0;
}
