#include <bits/stdc++.h>
using namespace std;
bool nu[100002];
int main() {
  int n, k;
  cin >> n >> k;
  long long ans = ((n - 1) << 1) + n;
  set<pair<int, int>> lul;
  for (int i = 0; i < k; ++i) {
    int va;
    cin >> va;
    if (!nu[va]) --ans;
    nu[va] = 1;
    pair<int, int> look1 = {va + 1, va};
    pair<int, int> look2 = {va - 1, va};
    if (nu[va - 1] && !lul.count(look2)) {
      --ans;
      lul.insert(look2);
    }
    if (nu[va + 1] && !lul.count(look1)) {
      --ans;
      lul.insert(look1);
    }
  }
  cout << ans << endl;
}
