#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k;
  cin >> n >> k;
  vector<int> v(k);
  unordered_map<int, int> freq, currfreq;
  vector<bool> last(n + 1, true), first(n + 1, true);
  for (int i = 0; i < k; i++) {
    cin >> v[i];
    freq[v[i]]++;
    last[v[i]] = false;
    currfreq[v[i]]++;
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    if (freq[i] == 0) {
      if (i == 1 || i == n)
        ans += 2;
      else
        ans += 3;
    }
  }
  for (int i = 0; i < k; i++) {
    if (first[v[i]]) {
      if (v[i] > 1)
        if (last[v[i] - 1]) ans += 1;
      if (v[i] < n)
        if (last[v[i] + 1]) ans += 1;
      first[v[i]] = false;
    }
    currfreq[v[i]]--;
    if (currfreq[v[i]] == 0) last[v[i]] = true;
  }
  cout << ans << endl;
  return 0;
}
