#include <bits/stdc++.h>
using namespace std;
const int oo = (int)1e9;
const double eps = 1e-7;
const int MAXN = 1e5 + 10;
int dx[] = {1, 0, 0, -1, -1, -1, 1, 1};
int dy[] = {0, 1, -1, 0, 1, -1, 1, -1};
int row[1002], col[1002];
int main() {
  int n, m, a, b;
  cin >> n >> m;
  int cnt = 0;
  for (int i = 0; i < m; i++) {
    cin >> a >> b;
    a--, b--;
    row[a] = 1;
    col[b] = 1;
  }
  for (int i = 1; i < n - 1; i++) {
    if (row[i] == 0) cnt++;
    if (col[i] == 0) cnt++;
  }
  if (n % 2 == 1 && col[n / 2] == 0 && row[n / 2] == 0) cnt--;
  cout << cnt << endl;
}
