#include <bits/stdc++.h>
using namespace std;
set<int> a[100005];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < k; ++i) {
    int x;
    cin >> x;
    --x;
    a[x].insert(i);
  }
  int total = 3 * n - 2;
  int toRem = 0;
  for (int i = 0; i < n; ++i) {
    if (!a[i].empty()) {
      toRem++;
    }
  }
  for (int i = 0; i < n - 1; ++i) {
    if (a[i].empty() || a[i + 1].empty()) continue;
    int getBigger = *(a[i].begin());
    int nxt = *(a[i + 1].rbegin());
    if (getBigger < nxt) {
      toRem++;
    }
  }
  for (int i = 1; i < n; ++i) {
    if (a[i].empty() || a[i - 1].empty()) {
      continue;
    }
    int getBigger = *(a[i].begin());
    int prv = *(a[i - 1].rbegin());
    if (getBigger < prv) {
      toRem++;
    }
  }
  total -= toRem;
  cout << total << "\n";
  return 0;
}
