#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
const long long int mod = 1000000007;
void solve() {
  int n, k;
  cin >> n >> k;
  set<pair<int, int>> se;
  vector<int> vec(k), pre(n + 1, 0), suff(n + 1, 0);
  for (int i = 0; i < k; i++) {
    cin >> vec[i];
    suff[vec[i]] += 1;
  }
  for (int i = 1; i < n; i++) {
    if (suff[i + 1] == 0) {
      se.insert({i, i + 1});
    }
    if (suff[i] == 0) {
      se.insert({i, i});
      se.insert({i + 1, i});
    }
  }
  if (suff[n] == 0) {
    se.insert({n, n});
  }
  for (int i = 0; i < k; i++) {
    pre[vec[i]] += 1;
    suff[vec[i]] -= 1;
    if (vec[i] != n && suff[vec[i]] == 0 && pre[vec[i] + 1] == 0) {
      se.insert({vec[i] + 1, vec[i]});
    }
    if (vec[i] != 1 && suff[vec[i]] == 0 && pre[vec[i] - 1] == 0) {
      se.insert({vec[i] - 1, vec[i]});
    }
  }
  cout << se.size() << "\n";
  return;
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
