#include <bits/stdc++.h>
using namespace std;
int n, m, ans, cur;
vector<int> adj[10];
map<pair<int, int>, bool> mp;
bool vis[10];
void dfs(int node, vector<int> &v) {
  vis[node] = 1;
  for (auto to : adj[node]) {
    int a = v[node], b = v[to];
    if (a > b) swap(a, b);
    if (!mp.count({a, b})) cur++, mp[{a, b}] = true;
    if (!vis[to]) dfs(to, v);
  }
}
void backtrack(int node, vector<int> &v) {
  if (node > n) {
    mp.clear();
    memset(vis, 0, sizeof(vis));
    cur = 0;
    for (int i = 1; i <= n; i++) {
      if (!vis[i]) dfs(i, v);
    }
    ans = max(ans, cur);
    return;
  }
  for (int i = 1; i <= 6; i++) {
    v[node] = i;
    backtrack(node + 1, v);
  }
}
void solve() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    adj[a].push_back(b), adj[b].push_back(a);
  }
  vector<int> v(10);
  backtrack(1, v);
  cout << ans << "\n";
}
int main() {
  solve();
  return 0;
}
