#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
unsigned long long int pow(unsigned long long int a, unsigned long long int b,
                           unsigned long long int c) {
  unsigned long long int ans = 1;
  while (b) {
    if (b & 1) {
      ans *= a;
      ans %= c;
    }
    b /= 2;
    a = a * a;
    a %= c;
  }
  return ans;
}
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> v(k);
  map<int, vector<int> > mp;
  for (long long int i = 0; i < k; i++) {
    cin >> v[i];
    mp[v[i]].push_back(i);
  }
  long long int ans = 0;
  for (long long int i = 1; i < n + 1; i++) {
    if (!mp.count(i)) {
      ans += 2;
      if (i > 1 && i < n) ans++;
    } else {
      if (i > 1) {
        if (!mp.count(i - 1))
          ans++;
        else if (mp[i - 1].back() < mp[i].front())
          ans++;
      }
      if (i < n) {
        if (!mp.count(i + 1) || ((mp[i + 1].back() < mp[i].front()))) ans++;
      }
    }
  }
  cout << ans << endl;
}
