#include <bits/stdc++.h>
using namespace std;
int can[1100][1100];
int ans, n;
int main() {
  int m, i, j, x, y, tmp;
  scanf("%d", &n);
  scanf("%d", &m);
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) can[i][j] = 1;
  for (i = 0; i < m; i++) {
    scanf("%d%d", &x, &y);
    x--;
    y--;
    can[x][0] = 0;
    can[x][n - 1] = 0;
    can[0][y] = 0;
    can[n - 1][y] = 0;
  }
  ans = 0;
  for (i = 1; i + i < n; i++) {
    if (i + i + 1 == n) {
      if ((can[0][i] == 1) || (can[n - 1][i] == 1) || (can[i][0] == 1) ||
          (can[i][n - 1] == 1))
        ans++;
    } else {
      tmp = 0;
      if (can[0][i] + can[i][n - 1] + can[n - 1][n - 1 - i] +
              can[n - 1 - i][0] >
          tmp)
        tmp = can[0][i] + can[i][n - 1] + can[n - 1][n - 1 - i] +
              can[n - 1 - i][0];
      if (can[0][n - 1 - i] + can[n - 1 - i][n - 1] + can[n - 1][i] +
              can[i][0] >
          tmp)
        tmp = can[0][n - 1 - i] + can[n - 1 - i][n - 1] + can[n - 1][i] +
              can[i][0];
      if (can[0][i] + can[0][n - 1 - i] > tmp)
        tmp = can[0][i] + can[0][n - 1 - i];
      if (can[n - 1][i] + can[n - 1][n - 1 - i] > tmp)
        tmp = can[n - 1][i] + can[n - 1][n - 1 - i];
      if (can[i][0] + can[n - 1 - i][0] > tmp)
        tmp = can[i][0] + can[n - 1 - i][0];
      if (can[i][n - 1] + can[n - 1 - i][n - 1] > tmp)
        tmp = can[i][n - 1] + can[n - 1 - i][n - 1];
      ans += tmp;
    }
  }
  printf("%d\n", ans);
}
