#include <bits/stdc++.h>
using namespace std;
inline void setmin(int &x, int y) {
  if (y < x) x = y;
}
inline void setmax(int &x, int y) {
  if (y > x) x = y;
}
inline void setmin(long long &x, long long y) {
  if (y < x) x = y;
}
inline void setmax(long long &x, long long y) {
  if (y > x) x = y;
}
const int N = 500;
const int inf = (int)1e9 + 1;
const long long big = (long long)1e18 + 1;
const int P = 239;
const int MOD = (int)1e9 + 7;
const int MOD1 = (int)1e9 + 9;
const double eps = 1e-9;
const double pi = atan2(0, -1);
const int ABC = 26;
set<int> G[N];
vector<int> g[N];
bool used[N];
int mt[N];
bool kuhn(int u) {
  if (used[u]) return false;
  used[u] = true;
  for (int v : g[u])
    if (mt[v] == -1 || kuhn(mt[v])) {
      mt[v] = u;
      return true;
    }
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(20);
  cout << fixed;
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    G[u].insert(v);
  }
  int ans = inf;
  for (int s = 0; s < n; s++) {
    int cnt = 0;
    if (G[s].find(s) == G[s].end()) cnt++;
    for (int i = 0; i < n; i++)
      if (i != s) {
        if (G[s].find(i) == G[s].end()) cnt++;
        if (G[i].find(s) == G[i].end()) cnt++;
      }
    for (int i = 0; i < n; i++) {
      mt[i] = -1;
      g[i].clear();
    }
    for (int i = 0; i < n; i++)
      if (i != s)
        for (int j : G[i])
          if (j != s) g[i].push_back(j);
    int sz = 0;
    for (int i = 0; i < n; i++) {
      fill(used, used + n, false);
      if (kuhn(i)) sz++;
    }
    cnt += (n - 1) - sz;
    cnt += m + cnt - (1 + (n - 1) * 2 + (n - 1));
    setmin(ans, cnt);
  }
  cout << ans << "\n";
  return 0;
}
