#include <bits/stdc++.h>
inline int getInt() {
  int s;
  scanf("%d", &s);
  return s;
}
using namespace std;
class Matching {
  vector<bool> visited;
  const vector<vector<int> > &g;
  int n;
  int m;
  bool augment(int left) {
    if (left < 0) return true;
    if (visited[left]) return false;
    visited[left] = true;
    for (int i = 0; i < (int)(g[left].size()); i++) {
      int right = g[left][i];
      if (augment(matching[right])) {
        matching[right] = left;
        return true;
      }
    }
    return false;
  }

 public:
  vector<int> matching;
  explicit Matching(const vector<vector<int> > &graph, int mm)
      : g(graph), m(mm) {
    n = graph.size();
  }
  int solve() {
    int matches = 0;
    matching = vector<int>(n, -1);
    visited = vector<bool>(n);
    for (int left = 0; left < (int)(m); left++) {
      visited.assign(n, false);
      if (augment(left)) matches++;
    }
    return matches;
  }
};
int main() {
  const int n = getInt();
  const int m = getInt();
  vector<pair<int, int> > e(m);
  vector<int> self(n);
  for (int i = 0; i < (int)(m); i++) {
    const int a = getInt() - 1;
    const int b = getInt() - 1;
    e[i] = make_pair(a, b);
  }
  int ans = 100000000;
  for (int i = 0; i < (int)(n); i++) {
    vector<vector<int> > gg(n + n);
    int cnt = 0;
    for (int j = 0; j < (int)(m); j++) {
      const int a = e[j].first;
      const int b = e[j].second;
      if (a != i && b != i) {
        gg[a].push_back(b + n);
        gg[b + n].push_back(a);
      } else {
        cnt++;
      }
    }
    int ret = Matching(gg, n).solve();
    int tmp = max(0, (n - 1) - ret) + max(0, (m - cnt) - ret);
    tmp += (2 * n - 1) - cnt;
    ans = min(ans, tmp);
  }
  printf("%d\n", ans);
  return 0;
}
