#include <bits/stdc++.h>
using namespace std;
int cols[1010], rows[1010];
int n, m;
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    a--, b--;
    rows[a]++, cols[b]++;
  }
  int ans = 0;
  for (int i = 1, j = n - 2; i <= j; i++, j--) {
    int count =
        (cols[i] == 0) + (rows[i] == 0) + (cols[j] == 0) + (rows[j] == 0);
    if (i == j) {
      count = min(1, count);
    }
    ans += count;
  }
  cout << ans << endl;
  return 0;
}
