#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000 + 100;
int n, m;
int r[maxn], c[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0, _n = (int)(m); i < _n; i++) {
    int x, y;
    cin >> x >> y;
    x--, y--;
    r[x] = c[y] = 1;
  }
  int ans = 0;
  for (int i = (int)(1), _n = (int)(n - 1); i < _n; i++) {
    int x = i, y = n - 1 - x;
    if (y < x) break;
    if (x != y) {
      int cnt = 4;
      cnt -= r[x];
      cnt -= r[y];
      cnt -= c[x];
      cnt -= c[y];
      ans += cnt;
    } else {
      int cnt = 2;
      cnt -= r[x];
      cnt -= c[x];
      ans += (cnt > 0);
    }
  }
  cout << ans << endl;
  {
    int _;
    cin >> _;
    return 0;
  }
}
