#include <bits/stdc++.h>
using namespace std;
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
bool rowban[1002] = {0};
bool colban[1002] = {0};
bool rowhired[1002][2] = {0};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, m;
  cin >> n >> m;
  for (long long int i = 0; i < m; i++) {
    long long int r, c;
    cin >> r >> c;
    rowban[r] = 1;
    colban[c] = 1;
  }
  long long int ans = 0;
  for (long long int i = 2; i <= n - 1; i++) {
    if (!rowban[i]) {
      ans++;
      rowhired[i][0] = 1;
      rowhired[i][1] = 1;
    }
  }
  for (long long int i = 2; i <= n - 1; i++) {
    if (colban[i]) continue;
    if (rowhired[i][0]) {
      if (rowhired[i][1] && (n - i + 1 != i)) {
        rowhired[i][0] = 0;
        ans++;
        continue;
      }
    }
    if (rowhired[n - i + 1][1]) {
      if (rowhired[n - i + 1][0] && (n - i + 1 != i)) {
        rowhired[n - i + 1][1] = 0;
        ans++;
        continue;
      }
    }
    if (rowhired[i][0] == 0 && rowhired[i][1] == 0) {
      ans++;
      continue;
    }
    if (rowhired[n - i + 1][0] == 0 && rowhired[n - i + 1][1] == 0) ans++;
  }
  cout << ans << "\n";
}
