#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  vector<vector<long long> > r1(n + 1), c1(n + 1);
  for (long long i = 0; i < m; i++) {
    long long l, r;
    cin >> l >> r;
    r1[l].push_back(r);
    c1[r].push_back(l);
  }
  long long ans = 0;
  for (long long i = 2; i <= n / 2 + 1; i++) {
    if (n % 2 == 0 and i == n / 2 + 1) break;
    vector<long long> q;
    if ((long long)r1[i].size() >= 1)
      q.push_back(0);
    else
      q.push_back(1);
    if ((long long)c1[i].size() >= 1)
      q.push_back(0);
    else
      q.push_back(1);
    if ((long long)c1[i].size() >= 1)
      q.push_back(0);
    else
      q.push_back(1);
    if ((long long)r1[i].size() >= 1)
      q.push_back(0);
    else
      q.push_back(1);
    if (r1[n - i + 1].size() >= 1)
      q.push_back(0);
    else
      q.push_back(1);
    if (c1[n - i + 1].size() >= 1)
      q.push_back(0);
    else
      q.push_back(1);
    if (c1[n - i + 1].size() >= 1)
      q.push_back(0);
    else
      q.push_back(1);
    if (r1[n - i + 1].size() >= 1)
      q.push_back(0);
    else
      q.push_back(1);
    if (n - i == i - 1) {
      for (long long j = 0; j < 8; j++)
        if (q[j]) {
          ans++;
          break;
        }
      break;
    }
    long long cx = 0;
    for (long long i1 = 0; i1 < 8; i1++) {
      long long cy = 0;
      for (long long j = i1; j < 8; j += 2)
        if (!q[j])
          continue;
        else
          cy++;
      cx = max(cx, cy);
    }
    ans += cx;
  }
  cout << ans << "\n";
}
