#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16000000")
using namespace std;
long long mod = 998244353;
long double inf = 1e9;
long double eps = 1e-8;
long double pi = acos(-1);
ifstream in("input.txt");
ofstream out("output.txt");
vector<vector<int>> g;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  g.resize(n);
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    g[u - 1].push_back(v - 1);
    g[v - 1].push_back(u - 1);
  }
  int c = 0;
  vector<vector<char>> a(6, vector<char>(6, 0));
  int ans = 0;
  for (int i = 0; i < 279937; i++) {
    for (int w = 0; w < 6; w++) {
      for (int q = 0; q < 6; q++) a[w][q] = 0;
    }
    vector<int> c;
    int v = i;
    for (int j = 0; j < n; j++) {
      c.push_back(v % 6);
      v /= 6;
    }
    int cans = 0;
    for (int j = 0; j < n; j++) {
      for (auto to : g[j]) {
        if (!a[min(c[j], c[to])][max(c[j], c[to])]) {
          a[min(c[j], c[to])][max(c[j], c[to])] = 1;
          cans++;
        }
      }
    }
    ans = max(ans, cans);
  }
  cout << ans;
  return 0;
}
