#include <bits/stdc++.h>
using namespace std;
bool x[1005], y[1005];
int main() {
  int n, m, i, j, k, l;
  scanf("%d %d", &n, &m);
  memset(x, 0, sizeof(x));
  memset(y, 0, sizeof(y));
  for (i = 1; i <= m; i++) {
    scanf("%d %d", &j, &k);
    x[j] = 1;
    y[k] = 1;
  }
  int ans = 0;
  if (n / 2 + 1 == n - n / 2) {
    i = n / 2 + 1;
    if (!x[i] || !y[i]) {
      ans++;
    }
  }
  for (i = 2; i <= n / 2; i++) {
    int i1 = i, i2 = n - i + 1;
    int q, w, e, r;
    int j = 0;
    for (q = 0; q < 3; q++)
      if (q == 0 || q > 0 && !x[i1]) {
        for (w = 0; w < 3; w++)
          if (w == 0 || w > 0 && !x[i2]) {
            for (e = 0; e < 3; e++)
              if (e == 0 || e > 0 && !y[i1]) {
                for (r = 0; r < 3; r++)
                  if (r == 0 || r > 0 && !y[i2]) {
                    if (q == 1 && e == 1) {
                      continue;
                    }
                    if (q == 2 && e == 2) {
                      continue;
                    }
                    if (w == 1 && r == 1) {
                      continue;
                    }
                    if (w == 2 && r == 2) {
                      continue;
                    }
                    if (q == 1 && r == 2) {
                      continue;
                    }
                    if (q == 2 && r == 1) {
                      continue;
                    }
                    if (w == 1 && e == 2) {
                      continue;
                    }
                    if (w == 2 && e == 1) {
                      continue;
                    }
                    j = max(j, (q > 0) + (w > 0) + (e > 0) + (r > 0));
                  }
              }
          }
      }
    ans += j;
  }
  printf("%d\n", ans);
}
