#include <bits/stdc++.h>
using namespace std;
int find(vector<int> a, int x) {
  int lo = 0, hi = ((int)(a).size());
  while (lo < hi) {
    int mid = lo + (hi - lo) / 2;
    if (a[mid] > x)
      hi = mid;
    else
      lo = mid + 1;
  }
  return lo != ((int)(a).size()) ? lo : -1;
}
int x[100123], n, k;
long long ans;
vector<vector<int> > pos;
int main() {
  ios_base::sync_with_stdio(0);
  while (cin >> n >> k) {
    ans = 3 * n - 2;
    pos = vector<vector<int> >(n + 2);
    for (int i = 0; i < k; ++i) {
      cin >> x[i];
      pos[x[i]].emplace_back(i);
    }
    for (int chave = 1; chave <= n; ++chave) {
      if (((int)(pos[chave]).size()) != 0) {
        --ans;
        int primeiro = pos[chave][0];
        ans -= (upper_bound((pos[chave - 1]).begin(), (pos[chave - 1]).end(),
                            primeiro) != pos[chave - 1].end());
        ans -= (upper_bound((pos[chave + 1]).begin(), (pos[chave + 1]).end(),
                            primeiro) != pos[chave + 1].end());
      }
    }
    cout << ans << '\n';
  }
  return 0;
}
