#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool rd(T &ret) {
  char c;
  int sgn;
  if (c = getchar(), c == EOF) return 0;
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  sgn = (c == '-') ? -1 : 1;
  ret = (c == '-') ? 0 : (c - '0');
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
  ret *= sgn;
  return 1;
}
template <class T>
inline void pt(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) pt(x / 10);
  putchar(x % 10 + '0');
}
const int N = 100005;
int n, m;
vector<int> X[1005], Y[1005];
bool cho[1005], chy[1005];
int main() {
  rd(n);
  rd(m);
  while (m--) {
    int x, y;
    rd(x);
    rd(y);
    X[x].push_back(y);
    Y[y].push_back(x);
  }
  int ans = 0;
  for (int x = 2; x < n; x++) {
    if (X[x].size()) continue;
    ans++;
    cho[x] = true;
  }
  for (int y = 2; y < n; y++) {
    if (Y[y].size()) continue;
    ans++;
    chy[y] = true;
  }
  if (n & 1 && cho[(n + 1) >> 1] && chy[(n + 1) >> 1]) ans--;
  pt(ans);
  return 0;
}
