#include <bits/stdc++.h>
using namespace std;
void fre() {
  freopen("c://test//input.in", "r", stdin);
  freopen("c://test//output.out", "w", stdout);
}
template <class T1, class T2>
inline void gmax(T1 &a, T2 b) {
  if (b > a) a = b;
}
template <class T1, class T2>
inline void gmin(T1 &a, T2 b) {
  if (b < a) a = b;
}
const int N = 4040, M = 0, Z = 1e9 + 7, ms63 = 0x3f3f3f3f;
int n, m;
int y, x;
int ln[1010], ls[1010];
vector<int> a[N];
int p[N];
bool e[N];
int hungary(int x) {
  e[x] = 1;
  for (int i = a[x].size() - 1; ~i; i--) {
    int y = a[x][i];
    if (p[y] == -1) {
      p[y] = x;
      return 1;
    }
  }
  for (int i = a[x].size() - 1; ~i; i--) {
    int y = a[x][i];
    if (!e[p[y]] && hungary(p[y])) {
      p[y] = x;
      return 1;
    }
  }
  return 0;
}
void ins(int x, int y) { a[x].push_back(y); }
int main() {
  while (~scanf("%d%d", &n, &m)) {
    memset(ln, 1, sizeof(ln));
    memset(ls, 1, sizeof(ls));
    int n2 = n * 2;
    int n3 = n * 3;
    int n4 = n * 4;
    for (int i = 1; i <= n4; ++i) a[i].clear();
    for (int i = 1; i <= m; ++i) {
      scanf("%d%d", &y, &x);
      ln[y] = 0;
      ls[x] = 0;
    }
    for (int i = 2; i < n; ++i)
      if (ln[i]) {
        ins(i, i + n);
        ins(i + n, i);
        if (ls[i]) {
          ins(i, i + n2);
          ins(i + n2, i);
        }
        if (ls[n + 1 - i]) {
          ins(i, i + n3);
          ins(i + n3, i);
        }
        if (ls[n + 1 - i]) {
          ins(i + n, i + n3);
          ins(i + n3, i + n);
        }
        if (ls[n + 1 - i]) {
          ins(i + n, n + 1 - i + n2);
          ins(n + 1 - i + n2, i + n);
        }
      }
    for (int j = 2; j < n; ++j)
      if (ls[j]) {
        ins(n + n + j, n + n + n + j);
        ins(n + n + n + j, n + n + j);
      }
    memset(p, -1, sizeof(p));
    int ans = 0;
    for (int i = 1; i <= n4; i++) {
      memset(e, 0, sizeof(e));
      if (hungary(i)) ans++;
    }
    ans /= 2;
    if (n & 1) {
      if (ln[n / 2 + 1] && ls[n / 2 + 1]) --ans;
    }
    printf("%d\n", ans);
  }
  return 0;
}
