#include <bits/stdc++.h>
using namespace std;
int n, m;
int ans;
int tans, x, y;
bool h[1024];
bool l[1024];
bool ap[1024];
bool ch[8];
int g[8][8];
int og[8][8];
void dfs(int dep, int cnt) {
  if (dep == 8) {
    if (cnt > tans) tans = cnt;
    return;
  }
  dfs(dep + 1, cnt);
  bool flag = true;
  for (int i = 0; i < dep; i++)
    if (g[dep][i] && ch[i]) flag = false;
  if (ap[dep] && flag) {
    ch[dep] = true;
    dfs(dep + 1, cnt + 1);
    ch[dep] = false;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    h[x] = true;
    l[y] = true;
  }
  og[0][6] = og[0][5] = og[0][2] = 1;
  og[1][7] = og[1][4] = og[1][3] = 1;
  og[2][3] = og[2][0] = og[2][7] = 1;
  og[3][2] = og[3][1] = og[3][6] = 1;
  og[4][5] = og[4][1] = og[4][6] = 1;
  og[5][4] = og[5][0] = og[5][7] = 1;
  og[6][0] = og[6][3] = og[6][4] = 1;
  og[7][1] = og[7][5] = og[7][2] = 1;
  int len;
  if (n % 2 == 0)
    len = n / 2;
  else
    len = n / 2 + 1;
  for (int i = 2; i <= len; i++) {
    memcpy(g, og, sizeof(og));
    memset(ap, false, sizeof(ap));
    if (i + i - 1 == n) {
      g[0][1] = g[1][0] = g[2][4] = g[4][2] = g[3][5] = g[5][3] = g[6][7] =
          g[7][6] = 1;
      g[0][7] = g[7][0] = g[1][6] = g[6][1] = g[2][5] = g[5][2] = g[3][4] =
          g[4][3] = 1;
      g[0][4] = g[4][0] = g[1][5] = g[5][1] = g[0][3] = g[3][0] = g[1][2] =
          g[2][1] = 1;
      g[4][7] = g[7][4] = g[5][6] = g[6][5] = g[6][2] = g[2][6] = g[7][3] =
          g[3][7] = 1;
    }
    memset(ap, true, sizeof(ap));
    memset(ch, false, sizeof(ch));
    if (h[i]) ap[2] = ap[3] = false;
    if (h[n - i + 1]) ap[4] = ap[5] = false;
    if (l[i]) ap[0] = ap[6] = false;
    if (l[n - i + 1]) ap[1] = ap[7] = false;
    tans = 0;
    dfs(0, 0);
    ans += tans;
  }
  printf("%d\n", ans);
  return 0;
}
