#include <bits/stdc++.h>
int main() {
  bool r[1000] = {0}, c[1000] = {0};
  int n, m, a, b;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &a, &b);
    r[a - 1] = c[b - 1] = true;
  }
  int cnt = 0;
  for (int i = 1; i < n - 1; i++) {
    if (!r[i]) cnt++;
    if (!c[i]) cnt++;
  }
  for (int i = 1; i < n - 1; i++) {
    for (int j = 1; j < n - 1; j++) {
      if (!r[i] && !c[j] && i == j && i == n - 1 - j) cnt--;
    }
  }
  printf("%d\n", cnt);
}
