#include <bits/stdc++.h>
using namespace std;
bool bx[1001];
bool by[1001];
long n, m;
long a[9];
long check4(long i1, long i2, long i3, long i4) {
  long ans = 0;
  if (a[i1]) {
    ans++;
  }
  if (a[i2]) {
    ans++;
  }
  if (a[i3]) {
    ans++;
  }
  if (a[i4]) {
    ans++;
  }
  return ans;
}
long check3(long i1, long i2, long i3) {
  long ans = 0;
  if (a[i1]) {
    ans++;
  }
  if (a[i2]) {
    ans++;
  }
  if (a[i3]) {
    ans++;
  }
  return ans;
}
long check2(long i1, long i2) {
  long ans = 0;
  if (a[i1]) {
    ans++;
  }
  if (a[i2]) {
    ans++;
  }
  return ans;
}
long getD(long y) {
  long ans = 0;
  long i;
  for (i = 0; i < 9; i++) {
    a[i] = 0;
  }
  if (by[y]) {
    a[1] = 1;
    a[4] = 1;
    ans = 1;
  }
  if (by[n - y - 1]) {
    a[8] = 1;
    a[5] = 1;
    ans = 1;
  }
  if (bx[y]) {
    a[2] = 1;
    a[7] = 1;
    ans = 1;
  }
  if (bx[n - y - 1]) {
    a[3] = 1;
    a[6] = 1;
    ans = 1;
  }
  ans = max(ans, check4(1, 5, 3, 7));
  ans = max(ans, check4(2, 6, 8, 4));
  ans = max(ans, check3(2, 6, 8));
  ans = max(ans, check3(2, 6, 4));
  ans = max(ans, check3(3, 7, 5));
  ans = max(ans, check3(3, 7, 1));
  ans = max(ans, check3(1, 5, 3));
  ans = max(ans, check3(1, 5, 7));
  ans = max(ans, check3(4, 8, 2));
  ans = max(ans, check3(4, 8, 6));
  ans = max(ans, check2(2, 3));
  ans = max(ans, check2(1, 8));
  ans = max(ans, check2(4, 5));
  ans = max(ans, check2(7, 6));
  return ans;
}
int main() {
  long i, j, x, y;
  cin >> n >> m;
  for (i = 0; i < n; i++) {
    bx[i] = 1;
    by[i] = 1;
  }
  for (i = 0; i < m; i++) {
    cin >> x >> y;
    x--;
    y--;
    bx[x] = 0;
    by[y] = 0;
  }
  long ans = 0;
  for (i = 1; i < n / 2; i++) {
    ans += getD(i);
  }
  if (n % 2 != 0) {
    long num = n / 2;
    if (bx[n / 2] || by[n / 2]) {
      ans++;
    }
  }
  cout << ans;
  return 0;
}
