#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000000 + 10;
int n;
int hang[1005], lie[1005];
int main() {
  int i, j, k, m, x, y;
  scanf("%d%d", &n, &m);
  while (m--) {
    scanf("%d%d", &x, &y);
    hang[x] = 1;
    lie[y] = 1;
  }
  int num = 0;
  for (i = 2; i < n; i++)
    if (hang[i] == 0) num++;
  for (i = 2; i < n; i++)
    if (lie[i] == 0) {
      if ((i == n + 1 - i) && hang[i] == 0) continue;
      num++;
    }
  printf("%d\n", num);
  return 0;
}
