#include <bits/stdc++.h>
using namespace std;
int G[555][555], H[555][555];
int bio[555], matched[555];
int n, m;
int dfs(int node) {
  if (bio[node]) return 0;
  bio[node] = 1;
  for (int i = 0; i < n; ++i) {
    if (!H[node][i]) continue;
    if (matched[i] == -1 || dfs(matched[i])) {
      matched[i] = node;
      return 1;
    }
  }
  return 0;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = (0); i < (m); ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    G[a - 1][b - 1] = 1;
  }
  int ret = 555 * 555;
  for (int source = (0); source < (n); ++source) {
    for (int i = (0); i < (n); ++i)
      for (int j = (0); j < (n); ++j) H[i][j] = G[i][j];
    int withs = 0;
    if (G[source][source]) withs--;
    for (int i = (0); i < (n); ++i) {
      withs += G[i][source] + G[source][i];
      H[i][source] = 0;
      H[source][i] = 0;
    }
    vector<int> left, right;
    for (int i = (0); i < (n); ++i)
      for (int j = (0); j < (n); ++j)
        if (H[i][j]) {
          left.push_back(i);
        }
    sort(left.begin(), left.end());
    left.erase(unique(left.begin(), left.end()), left.end());
    memset(matched, -1, sizeof matched);
    int t = 0;
    for (int i = 0; i < (int)((left).size()); ++i) {
      memset(bio, 0, sizeof bio);
      t += dfs(left[i]);
    }
    ret = min(ret, 2 * n - 1 - withs + m - withs - t + n - 1 - t);
  }
  printf("%d\n", ret);
  return 0;
}
