#include <bits/stdc++.h>
using namespace std;
const int maxn = 600;
int n, m, e[maxn][maxn] = {0}, ans = 0x7fffffff;
int de[maxn][2] = {0};
int f[maxn], vis[maxn];
bool find(int ro, int x) {
  int i;
  if (vis[x]) return 0;
  vis[x] = 1;
  for (i = 1; i <= n; i++)
    if (i != ro && e[x][i] && (!f[i] || find(ro, f[i]))) {
      f[i] = x;
      return 1;
    }
  return 0;
}
int calc(int x) {
  int i, s = 0;
  for (i = 1; i <= n; i++)
    if (i != x) memset(vis, 0, sizeof(vis)), s += find(x, i);
  return s;
}
int main() {
  int i, x, y;
  scanf("%d%d", &n, &m);
  for (i = 0; i < m; i++) {
    scanf("%d%d", &x, &y);
    e[x][y] = 1;
    de[x][1]++, de[y][0]++;
  }
  for (i = 1; i <= n; i++) {
    memset(f, 0, sizeof(f));
    int s, rem = de[i][1] + de[i][0] - e[i][i], rem0 = calc(i);
    s = 2 * n - 1 - rem;
    s += m - rem - rem0;
    s += n - 1 - rem0;
    ans = min(ans, s);
  }
  printf("%d\n", ans);
  return 0;
}
