#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > graph;
vector<int> edges(500, -1);
vector<vector<int> > other(500);
set<int> used;
bool max_mathcing(int v) {
  if (used.count(v)) {
    return false;
  }
  used.insert(v);
  for (int i = 0; i < other[v].size(); ++i) {
    if (edges[other[v][i]] == -1 ||
        !used.count(edges[other[v][i]]) && max_mathcing(edges[other[v][i]])) {
      edges[other[v][i]] = v;
      return true;
    }
  }
  return false;
}
int main() {
  int n, m, a, b;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> a >> b;
    graph.push_back(make_pair(a - 1, b - 1));
  }
  int answer = INT_MAX;
  for (int i = 0; i < n; i++) {
    int center_count = 0;
    int other_count = 0;
    int _answer = 0;
    for (int j = 0; j < n; j++) {
      other[j].clear();
      edges[j] = -1;
    }
    for (int j = 0; j < m; j++) {
      if (graph[j].first == i || graph[j].second == i) {
        center_count++;
      } else {
        other[graph[j].first].push_back(graph[j].second);
        other_count++;
      }
    }
    for (int k = 0; k < n; k++) {
      used.clear();
      max_mathcing(k);
    }
    int edges_count = 0;
    for (int k = 0; k < n; k++) {
      if (edges[k] != -1) {
        edges_count++;
      }
    }
    _answer += (2 * (n - 1) + 1 - center_count + other_count - edges_count +
                (n - 1) - edges_count);
    if (_answer <= answer) {
      answer = _answer;
    }
  }
  cout << answer;
  return 0;
}
