#include <bits/stdc++.h>
using namespace std;
int main() {
  int px[1010], py[1010];
  int n, m;
  memset(px, 0, sizeof(px));
  memset(py, 0, sizeof(py));
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    px[x] = 1;
    py[y] = 1;
  }
  int ans = 0;
  for (int i = 2; i < n; i++) {
    if (px[i] && py[i]) continue;
    ans++;
    if (px[i] || py[i] || i * 2 - 1 == n)
      continue;
    else
      ans++;
  }
  printf("%d", ans);
}
