#include <bits/stdc++.h>
const int N = 1005;
int T, n, m, x, y, res, ans = 1 << 20, v[N], p[N], next[N], ed[N], son[N];
bool b[N][N];
bool find(int x) {
  for (int e = son[x], y; e; e = next[e])
    if (v[y = ed[e]] != T) {
      v[y] = T;
      if (!p[y] || find(p[y])) return p[y] = x, 1;
    }
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i)
    scanf("%d%d", &x, &y), b[x][y] = 1, ed[i] = y, next[i] = son[x], son[x] = i;
  for (int i = 1; i <= n; ++i) {
    res = n * 3 - 2 + m;
    for (int j = 1; j <= n; ++j) {
      v[j] = p[j] = 0;
      if (b[i][j]) res -= 2;
      if (b[j][i] && i != j) res -= 2;
    }
    p[i] = -1, T = 0;
    for (int j = 1; j <= n; ++j) {
      T = j;
      if (i != j)
        if (find(j)) res -= 2;
    }
    if (res < ans) ans = res;
  }
  printf("%d\n", ans);
  return 0;
}
