#include <bits/stdc++.h>
using namespace std;
int b[1002][1002] = {0};
int main() {
  int a[8][3] = {{7, 3, 5}, {2, 6, 4}, {1, 5, 7}, {0, 4, 6},
                 {3, 7, 1}, {0, 2, 6}, {1, 3, 5}, {0, 2, 4}};
  int x[8];
  int y[8];
  int d[8];
  int n;
  int m;
  int tmpx, tmpy;
  int sum = 0;
  cin >> n >> m;
  if (n == 2) {
    cout << "0\n";
    return 0;
  }
  for (int i = 0; i < m; ++i) {
    cin >> tmpx >> tmpy;
    b[tmpx][1] = 1;
    b[tmpx][n] = 1;
    b[1][tmpy] = 1;
    b[n][tmpy] = 1;
  }
  for (int i = 2; i <= n / 2; ++i) {
    x[0] = i;
    x[1] = n + 1 - i;
    x[2] = n;
    x[3] = n;
    x[4] = n + 1 - i;
    x[5] = i;
    x[6] = 1;
    x[7] = 1;
    y[0] = 1;
    y[1] = 1;
    y[2] = i;
    y[3] = n + 1 - i;
    y[4] = n;
    y[5] = n;
    y[6] = n + 1 - i;
    y[7] = i;
    bool g = false;
    int count;
    int mx = 0;
    for (int j = 0; j < 256; ++j) {
      count = 0;
      for (int k = 0; k < 8; ++k) {
        d[k] = ((j >> k) & 1);
        count += d[k];
      }
      g = false;
      for (int k = 0; k < 8 && (!g); ++k) {
        if (d[k] == 1) {
          if (b[x[k]][y[k]] == 1) {
            g = true;
            break;
          }
          for (int u = 0; u < 3; ++u) {
            if (d[a[k][u]] == 1) {
              g = true;
              break;
            }
          }
        }
      }
      if (g) continue;
      if (count > mx) mx = count;
    }
    sum += mx;
  }
  if (n % 2 == 1) {
    if (b[n / 2 + 1][1] == 0 || b[n / 2 + 1][n] == 0 || b[1][n / 2 + 1] == 0 ||
        b[n][n / 2 + 1] == 0) {
      ++sum;
    }
  }
  cout << sum << "\n";
  return 0;
}
