#include <bits/stdc++.h>
using namespace std;
template <class T>
bool uin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
const long long maxn = 1000001, mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  map<int, int> mapp;
  map<pair<long long, long long>, int> maa;
  int ans;
  if (n >= 2) {
    ans = 2 * 2 + (n - 2) * 3;
  }
  if (n == 1) {
    ans = 1;
  }
  if (n == 2) {
    ans = 4;
  }
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    if (x == 1) {
      if (mapp.find(x + 1) != mapp.end()) {
        maa[make_pair(x + 1, x)];
      }
    } else if (x == n) {
      if (mapp.find(x - 1) != mapp.end()) {
        maa[make_pair(x - 1, x)];
      }
    } else {
      if (mapp.find(x - 1) != mapp.end()) {
        maa[make_pair(x - 1, x)];
      }
      if (mapp.find(x + 1) != mapp.end()) {
        maa[make_pair(x + 1, x)];
      }
    }
    mapp[x];
  }
  cout << ans - maa.size() - mapp.size();
  return 0;
}
