#include <bits/stdc++.h>
using namespace std;
bool row[5020], col[5020];
int h[5020], nxt[1020000], vv[1020000];
int e, ans;
int be[5020];
bool vis[5020];
int n, m;
void add(int u, int v) {
  nxt[e] = h[u];
  vv[e] = v;
  h[u] = e++;
}
bool find(int u) {
  for (int i = h[u]; i + 1; i = nxt[i]) {
    int v = vv[i];
    if (!vis[v]) {
      vis[v] = true;
      if (be[v] == -1 || find(be[v])) {
        be[v] = u;
        return true;
      }
    }
  }
  return false;
}
void solve() {
  memset(be, -1, sizeof(be));
  for (int i = 2; i < n; i++) {
    memset(vis, false, sizeof(vis));
    if (find(i)) ans--;
  }
  printf("%d\n", ans);
}
int main() {
  int x, y;
  scanf("%d%d", &n, &m);
  memset(h, -1, sizeof(h));
  e = ans = 0;
  while (m--) {
    scanf("%d%d", &x, &y);
    row[x] = true;
    col[y] = true;
  }
  for (int i = 2; i < n; i++) {
    if (!row[i]) ans += 1;
    if (!col[i]) ans += 1;
  }
  for (int i = 2; i < n; i++) {
    if (row[i]) continue;
    bool ok = true;
    int j;
    for (j = 2; j < n; j++) {
      if (col[j]) continue;
      if (i != j || i != n + 1 - j) continue;
      ok = false;
      break;
    }
    if (!ok) add(i, n + j);
  }
  solve();
}
