#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = MOD;
int bad[8][3];
int main() {
  std::ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<vector<bool> > good(n, vector<bool>(n, true));
  while (m--) {
    int i, j;
    cin >> i >> j;
    --i, --j;
    good[i][j] = false;
  }
  if (n == 2) {
    cout << "0\n";
    return 0;
  }
  vector<vector<bool> > avail(4, vector<bool>(n, true));
  bad[0][0] = 4;
  bad[0][1] = 2;
  bad[0][2] = 7;
  bad[1][0] = 5;
  bad[1][1] = 3;
  bad[1][2] = 6;
  bad[2][0] = 5;
  bad[2][1] = 0;
  bad[2][2] = 6;
  bad[3][0] = 4;
  bad[3][1] = 1;
  bad[3][2] = 7;
  bad[4][0] = 0;
  bad[4][1] = 6;
  bad[4][2] = 3;
  bad[5][0] = 1;
  bad[5][1] = 2;
  bad[5][2] = 7;
  bad[6][0] = 1;
  bad[6][1] = 2;
  bad[6][2] = 4;
  bad[7][0] = 0;
  bad[7][1] = 5;
  bad[7][2] = 3;
  for (int i = 1; i < n - 1; ++i) {
    for (int j = 0; j < n; ++j)
      if (!good[i][j]) {
        avail[0][i] = avail[1][i] = false;
        break;
      }
  }
  for (int j = 1; j < n - 1; ++j) {
    for (int i = 0; i < n; ++i)
      if (!good[i][j]) {
        avail[2][j] = avail[3][j] = false;
        break;
      }
  }
  int res = 0;
  vector<int> ind(8);
  for (int i = 1; i < n / 2; ++i) {
    ind[0] = ind[2] = ind[4] = ind[6] = i;
    ind[1] = ind[3] = ind[5] = ind[7] = n - 1 - i;
    int mx = 0;
    for (int mask = 0; mask < 256; ++mask) {
      bool flag = true;
      int one_cnt = 0;
      for (int i = 0; i < 8; ++i) {
        if ((1 << i) & mask) {
          ++one_cnt;
          if (!avail[i / 2][ind[i]]) {
            flag = false;
            break;
          }
          for (int j = 0; j < 3; ++j) {
            if ((1 << bad[i][j]) & mask) {
              flag = false;
              break;
            }
          }
        }
      }
      if (!flag) continue;
      mx = max(mx, one_cnt);
    }
    res += mx;
  }
  if ((n & 1) && (avail[0][n / 2] || avail[2][n / 2])) ++res;
  cout << res << endl;
  return 0;
}
