#include <bits/stdc++.h>
using namespace std;
int b[2][1010];
int bitCnt(int N) {
  int total = 0;
  for (int i = 0; i < 20; i++)
    if (N & (1 << i)) total++;
  return total;
}
bool possib(int x1, int x2, int state) {
  for (int i = 0; i < 8; i += 2) {
    if (!(state & (1 << i))) continue;
    int x = (i + 3) % 8;
    if (state & (1 << x)) return false;
    x = (i + 5) % 8;
    if (state & (1 << x)) return false;
    x = (i + 7) % 8;
    if (state & (1 << x)) return false;
  }
  for (int i = 1; i < 8; i += 2) {
    if (!(state & (1 << i))) continue;
    int x = (i + 1) % 8;
    if (state & (1 << x)) return false;
    x = (i + 3) % 8;
    if (state & (1 << x)) return false;
    x = (i + 5) % 8;
    if (state & (1 << x)) return false;
  }
  if ((state & 1 << 0) || (state & 1 << 5))
    if (!b[0][x1]) return false;
  if ((state & 1 << 1) || (state & 1 << 4))
    if (!b[0][x2]) return false;
  if ((state & 1 << 2) || (state & 1 << 7))
    if (!b[1][x1]) return false;
  if ((state & 1 << 3) || (state & 1 << 6))
    if (!b[1][x2]) return false;
  return true;
}
int main() {
  int N, M;
  cin >> N >> M;
  for (int i = 0; i < 1010; i++) b[0][i] = b[1][i] = true;
  b[0][0] = b[1][0] = b[0][N - 1] = b[1][N - 1] = false;
  for (int i = 0; i < M; i++) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    b[0][x] = false;
    b[1][y] = false;
  }
  int total = 0;
  for (int i = 1, j = N - 2; i < j; i++, j--) {
    int maxPos = 0;
    for (int k = 0; k < (1 << 8); k++)
      if (possib(i, j, k)) {
        maxPos = max(maxPos, bitCnt(k));
      }
    total += maxPos;
  }
  if (N % 2 == 1) {
    int mid = N / 2;
    if (b[0][mid] || b[1][mid]) total += 1;
  }
  cout << total << endl;
  return 0;
}
