#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  vector<vector<int>> b(n, vector<int>(4, 0));
  for (int i = 0; i < m; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    --x;
    --y;
    b[x][0] = b[x][1] = 1;
    b[y][2] = b[y][3] = 1;
  }
  int ans = 0;
  for (int i = 1; i < n - 1; ++i) {
    auto& a = b[i];
    if (a[0] == 1 && a[1] == 1) {
      if (a[2] == 0 || a[3] == 0) {
        ++ans;
      }
    } else {
      if (a[2] == 1 && a[3] == 1) {
        ++ans;
      } else {
        if ((a[0] == 1 && a[2] == 1) || (a[1] == 1 && a[3] == 1) ||
            2 * i + 1 == n) {
          ++ans;
        } else {
          ans += 2;
        }
      }
    }
  }
  printf("%d\n", ans);
}
