#include <bits/stdc++.h>
using namespace std;
int n, m, cnt, markr[1500], markc[1500], a, b, i;
int main() {
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    cin >> a >> b;
    if (markr[a] == 0 && a != 1 && a != n) {
      markr[a] = 1;
    }
    if (markc[b] == 0 && b != 1 && b != n) {
      markc[b] = 1;
    }
  }
  int flag;
  for (i = 2; i <= (n + 1) / 2; i++) {
    flag = 0;
    if (markc[i] == 0) {
      markc[i] = 1;
      cnt += 1;
      flag = 1;
    }
    if (markc[n - i + 1] == 0) {
      markc[n - i + 1] = 1;
      cnt += 1;
      flag = 2;
    }
    if (flag == 0) {
      if (markr[i] == 0) {
        cnt += 1;
        markr[i] = 1;
      }
      if (markr[n - i + 1] == 0) {
        cnt += 1;
        markr[n - i + 1] = 1;
      }
    } else if (flag == 1) {
      if (markr[i] == 0 && (n - i + 1 != i)) {
        cnt += 1;
        markr[i] = 1;
      }
      if (markr[n - i + 1] == 0 && (n - i + 1) != i) {
        cnt += 1;
        markr[n - i + 1] = 1;
      }
    } else if (flag == 2) {
      if (markr[i] == 0 && (n - i + 1 != i)) {
        cnt += 1;
        markr[i] = 1;
      }
      if (markr[n - i + 1] == 0 && (n - i + 1) != i) {
        cnt += 1;
        markr[n - i + 1] = 1;
      }
    }
  }
  cout << cnt;
  return 0;
}
