#include <bits/stdc++.h>
using namespace std;
int nn;
bool possible(int msk, vector<pair<int, int> > &v) {
  for (int i = 0; i < (((int)(v).size())); i++) {
    if (!(msk & (1 << i))) continue;
    for (int j = (i + 1); j < (((int)(v).size())); j++) {
      if (!(msk & (1 << j))) continue;
      if (v[i].first == v[j].first && abs(v[i].second - v[j].second) == nn)
        return false;
      if (v[i].second == v[j].second && abs(v[i].first - v[j].first) == nn)
        return false;
      if (v[i].first == v[j].second && v[i].second == v[j].first) return false;
      if (v[i].first == nn - v[j].second && v[i].second == nn - v[j].first + 1)
        return false;
      if (v[j].first == nn - v[i].second && v[j].second == nn - v[i].first + 1)
        return false;
    }
  }
  return true;
}
int chose(vector<pair<int, int> > v) {
  int re = 0;
  for (int i = (1); i < (1 << ((int)(v).size())); i++) {
    if (possible(i, v)) {
      re = max(re, __builtin_popcount(i));
    }
  }
  return re;
}
int main(void) {
  ios_base::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  nn = n;
  vector<int> row(n + 1, 0), col(n + 1, 0);
  for (int i = 0; i < (m); i++) {
    int t, tt;
    cin >> t >> tt;
    row[t]++;
    col[tt]++;
  }
  int cc = 0;
  for (int i = (2); i < ((n + 1) / 2 + 1); i++) {
    if (i == (n - i + 1)) {
      if (!row[i] || !col[i]) cc++;
      continue;
    }
    vector<pair<int, int> > v;
    if (!row[i]) {
      v.push_back(make_pair(i, 0));
      v.push_back(make_pair(i, n));
    }
    if (!row[n - i + 1]) {
      v.push_back(make_pair(n - i + 1, 0));
      v.push_back(make_pair(n - i + 1, n));
    }
    if (!col[i]) {
      v.push_back(make_pair(0, i));
      v.push_back(make_pair(n, i));
    }
    if (!col[n - i + 1]) {
      v.push_back(make_pair(0, n - i + 1));
      v.push_back(make_pair(n, n - i + 1));
    }
    cc += chose(v);
  }
  cout << cc << endl;
  return 0;
}
