#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000001;
const long double EPS = 10e-9;
const int MAX_N = 1005;
int n, m, a, b, res;
bool bx[MAX_N], by[MAX_N];
int cy[MAX_N];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < (m); ++i) {
    scanf("%d %d", &a, &b);
    bx[a] = by[b] = 1;
  }
  res = 2 * (n - 2);
  for (int i = 2; i <= (n - 1); ++i) {
    if (bx[i]) res--;
    if (by[i]) res--;
  }
  if (res == 2 * (n - 2) && n & 1) res--;
  printf("%d\n", ((0) > (res) ? (0) : (res)));
  return 0;
}
