#include <bits/stdc++.h>
using namespace std;
struct edge {
  int t, next;
} g[500001];
bool v[4101], r[4101], c[4101];
int i, j, k, n, m, ans, match[4101], col[4101], lim, h[4101], tot;
void addedge(int x, int y) {
  g[++tot].t = y;
  g[tot].next = h[x];
  h[x] = tot;
  g[++tot].t = x;
  g[tot].next = h[y];
  h[y] = tot;
}
bool vo(int x) {
  if (x % n <= 1 || x % n == lim) return 0;
  return (x <= 2 * n) ? !r[x % n] : !c[x % n];
}
void dfs(int x) {
  for (int i = h[x]; i; i = g[i].next)
    if (!col[g[i].t]) {
      col[g[i].t] = 3 - col[x];
      dfs(g[i].t);
    }
}
bool find(int x) {
  for (int i = h[x]; i; i = g[i].next) {
    if (v[g[i].t] || !vo(g[i].t)) continue;
    v[g[i].t] = 1;
    if (!match[g[i].t] || find(match[g[i].t])) {
      match[g[i].t] = x;
      return 1;
    }
  }
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  memset(r, 0, sizeof(r));
  memset(c, 0, sizeof(c));
  memset(col, 0, sizeof(col));
  tot = 0;
  memset(h, 0, sizeof(h));
  if (n & 1)
    lim = n / 2 + 1;
  else
    lim = -1;
  for (i = 1; i <= m; i++) scanf("%d%d", &j, &k), r[j] = c[k] = 1;
  for (i = 2; i < n; i++)
    if (lim != i) {
      addedge(i, i + n);
      addedge(i, 2 * n + i);
      addedge(i, 3 * n + n - i + 1);
      addedge(n + i, 2 * n + n - i + 1);
      addedge(n + i, 3 * n + i);
      addedge(2 * n + i, 3 * n + i);
    }
  ans = 4 * n - 8;
  if (n & 1) ans -= 4;
  for (i = 1; i <= 2 * n; i++) {
    if (i % n <= 1 || i % n == lim) continue;
    if (!r[i % n]) {
      if (!col[i]) col[i] = 1, dfs(i);
    } else
      ans--;
  }
  for (i = 2 * n + 1; i <= 4 * n; i++) {
    if (i % n <= 1 || i % n == lim) continue;
    if (!c[i % n]) {
      if (!col[i]) col[i] = 1, dfs(i);
    } else
      ans--;
  }
  memset(match, 0, sizeof(match));
  for (i = 1; i <= 4 * n; i++)
    if (col[i] == 1 && vo(i)) {
      memset(v, 0, sizeof(v));
      if (find(i)) ans--;
    }
  if (n & 1)
    if (!r[lim] || !c[lim]) ans++;
  printf("%d\n", ans);
  return 0;
}
