#include <bits/stdc++.h>
using namespace std;
int row[200005], col[200005];
int sh[1005][1005];
int main() {
  int i, j, k, l, m, n, t, x, y, ans = 0;
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    cin >> x >> y;
    row[x] = 1;
    col[y] = 1;
  }
  for (i = 2; i < n; i++) {
    if (row[i] == 1) continue;
    if (!col[i]) {
      sh[n - i + 1][i] = 1;
    } else
      sh[i][i] = 1;
    ans++;
  }
  for (i = 2; i < n; i++) {
    if (col[i]) continue;
    if (!sh[i][i] || !sh[i][n - i + 1]) ans++;
  }
  cout << ans << endl;
  return 0;
}
