#include <bits/stdc++.h>
using namespace std;
int i, n, p, k, m, x[1111], y[1111];
int main() {
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    x[a] = 1;
    y[b] = 1;
  }
  int t1 = 0, t2 = 0;
  for (i = 2; i < n; i++)
    if (x[i] == 0) t1++;
  for (i = 2; i < n; i++)
    if (y[i] == 0) {
      t1++;
      if (n % 2 && i == n / 2 + 1 && x[i] == 0) t1--;
    }
  for (i = 2; i < n; i++)
    if (y[i] == 0) t2++;
  for (i = 2; i < n; i++)
    if (x[i] == 0) {
      t2++;
      if (n % 2 && i == n / 2 + 1 && y[i] == 0) t2--;
    }
  cout << max(t1, t2);
}
