#include <bits/stdc++.h>
using ll = long long;
const ll N = 2 * 1e5 + 5;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
const ll SZ = 101;
const double eps = 1e-9;
using namespace std;
void solve() {
  ll n, k;
  cin >> n >> k;
  vector<ll> a(k);
  set<ll> st;
  for (ll(i) = 0; i < (k); i++) cin >> a[i], st.insert(a[i]);
  set<ll> vis[n + 1];
  map<ll, ll> cnt;
  ll ans = n * 3 - 2;
  ll start = n - (ll)st.size();
  for (ll(i) = 0; i < (k); i++) {
    cnt[a[i]]++;
    for (ll j = (-1); j <= (1); j++)
      if (a[i] + j >= 1 && a[i] + j <= n) {
        if (vis[a[i]].find(a[i] + j) == vis[a[i]].end()) {
          if (cnt[a[i] + j] > 0) {
            ans--;
            vis[a[i]].insert(a[i] + j);
          }
        }
      }
  }
  cout << ans;
}
int32_t main(int32_t argc, char *argv[]) {
  double t1 = clock();
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ll TC = 1, t = 0;
  while (t++ < TC) {
    solve();
  }
  if (false)
    cerr << "Time : " << 1000 * (clock() - t1) / CLOCKS_PER_SEC << " ms\n";
  return 0;
}
