#include <bits/stdc++.h>
using namespace std;
const int N = 505;
int n, m;
vector<int> g[N], ng[N];
int L[N], R[N], used[N];
int dfs(int v) {
  if (used[v] == 1) {
    return 0;
  }
  used[v] = 1;
  for (int i : ng[v]) {
    if (L[i] == -1 || dfs(L[i]) == 1) {
      L[i] = v, R[v] = i;
      return 1;
    }
  }
  return 0;
}
int max_matching() {
  int res = 0;
  memset(L, -1, sizeof(L));
  memset(R, -1, sizeof(R));
  for (int i = 1; i <= n; i++) {
    res += dfs(i);
    memset(used, 0, sizeof(used));
  }
  return res;
}
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
  }
  int res = 1000000000;
  for (int i = 1; i <= n; i++) {
    int cnt = 0;
    for (int j = 1; j <= n; j++) {
      for (int k : g[j]) {
        if (j == i || k == i) {
          cnt++;
          continue;
        }
        ng[j].push_back(k);
      }
    }
    int x = max_matching();
    res = min(res, (3 * n - 2) - 2 * (cnt + x) + m);
    for (int j = 1; j <= n; j++) {
      ng[j].clear();
    }
  }
  cout << res << endl;
  return 0;
}
