#include <bits/stdc++.h>   using namespace std;   int main() {     int n, m;     cin >> n >> m;     if (n <= 6) {       cout << m << endl;       return 0;     }     int mark[8][8] = {0}, i, j, deg[8] = {0}, a, k;     for (i = 0; i < m; i++) {       int x, y;       cin >> x >> y;       mark[x][y] = 1;       mark[y][x] = 1;       deg[x]++;       deg[y]++;     }     int max = INT_MIN;     for (i = 1; i <= 7; i++) {       int v[8] = {0}, c = 0, count = 0;       count = m - deg[i];       for (j = 1; j <= 7; j++) {         if (j == i) continue;         for (k = 1; k <= 7; k++) {           if (k == i) continue;           if (mark[j][k] == 0 && mark[j][i] == 1) v[k]++;         }       }       sort(v, v + 8);       for (j = 1; j <= 7; j++) {         if (mark[i][j] == 1) c++;       }       if (c < v[7])         count += c;       else         count += v[7];       if (count > max) max = count;     }     cout << max << endl;     return 0;   }   