#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 1e3 + 5;
const double PI = acos(-1);
int mat[N][N];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  bool banr[N] = {0}, banc[N] = {0};
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    banr[x - 1] = 1;
    banc[y - 1] = 1;
  }
  int cntr1 = (n - 2) * 2;
  if (n % 2) cntr1--;
  int cntr2 = cntr1;
  for (int i = 1; i + 1 < n; i++) {
    if (banc[i]) cntr1--;
    if (banr[i]) {
      if (n % 2) {
        int num = n / 2;
        if (i != num) cntr1--;
      } else
        cntr1--;
    }
  }
  for (int i = 1; i + 1 < n; i++) {
    if (banr[i]) cntr2--;
    if (banc[i]) {
      if (n % 2) {
        int num = n / 2;
        if (i != num) cntr2--;
      } else
        cntr2--;
    }
  }
  printf("%d\n", max(cntr1, cntr2));
  return 0;
}
