#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 2, inf = 1e18;
long long n, k, u, f[N], ans, a[N], id[N];
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> k;
  for (long long i = 1; i <= k; i++) {
    cin >> a[i];
    id[a[i]] = i;
  }
  set<pair<long long, long long>> chk;
  for (long long i = 1; i <= n; i++) {
    chk.insert({i, i});
    if (i + 1 <= n) chk.insert({i, i + 1});
    if (i - 1 >= 1) chk.insert({i, i - 1});
  }
  for (long long i = 1; i <= k; i++) {
    if (chk.find({a[i], a[i]}) != chk.end()) chk.erase(chk.find({a[i], a[i]}));
    long long u = a[i], v;
    if (u + 1 <= n) {
      v = u + 1;
      if (id[v] > i) {
        if (chk.find({u, v}) != chk.end()) chk.erase(chk.find({u, v}));
      }
    }
    if (u - 1 >= 1) {
      v = u - 1;
      if (id[v] > i) {
        if (chk.find({u, v}) != chk.end()) chk.erase(chk.find({u, v}));
      }
    }
  }
  cout << (long long)(chk.size()) << '\n';
}
