#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2010;
bool row[MAXN], col[MAXN];
int N, M;
int main() {
  cin >> N >> M;
  for (int i = 0; i < M; ++i) {
    int x, y;
    cin >> x >> y;
    row[x] = 1;
    col[y] = 1;
  }
  int ans = 0;
  for (int r = 2; r * 2 <= N; ++r) {
    int cnt = row[r] + row[N - r + 1] + col[r] + col[N - r + 1];
    ans += 4 - cnt;
  }
  if (N % 2 && N > 2) ans += !row[N / 2 + 1] || !col[N / 2 + 1];
  cout << ans << endl;
  return 0;
}
