#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const long long INF = 1e18;
const long double PI = acos(-1);
const long double EPS = 1e-9;
int mod = 998244353;
const int MOD7 = 1000000007;
const int MOD9 = 1000000009;
signed main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  srand(time(NULL));
  int n, m;
  cin >> n >> m;
  vector<pair<int, int>> a(m);
  for (int i = 0; i < m; ++i) {
    cin >> a[i].first >> a[i].second;
    a[i].first--, a[i].second--;
  }
  vector<int> perm(n);
  iota((perm).begin(), (perm).end(), 1);
  int ans = 0;
  int pw = 1;
  for (int j = 0; j < n; ++j) pw *= 6;
  for (int num = 0; num < pw; ++num) {
    int t = num;
    for (int j = 0; j < n; ++j) {
      perm[j] = t % 6;
      t /= 6;
    }
    int now = 0;
    map<pair<int, int>, int> cnt;
    for (auto i : a) {
      int x = perm[i.first];
      int y = perm[i.second];
      if (x > y) swap(x, y);
      if (!cnt[{x, y}]) {
        cnt[{x, y}]++;
        ++now;
      }
    }
    ans = max(ans, now);
  }
  cout << ans;
}
