#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
vector<int> v;
vector<ll> first;
vector<ll> last;
int main() {
  int n, k;
  int x;
  cin >> n >> k;
  for (int i = 0; i < k; ++i) {
    cin >> x;
    v.push_back(x - 1);
  }
  last.resize(n);
  first.resize(n);
  for (int i = 0; i < k; ++i) {
    if (first[v[i]] == 0) first[v[i]] = i + 1;
  }
  for (int i = k - 1; i >= 0; i--) {
    if (last[v[i]] == 0) last[v[i]] = i + 1;
  }
  ll sum = 0;
  for (int i = 0; i < n; ++i) {
    if (first[i] == 0) sum++;
  }
  for (int i = 0; i < n - 1; ++i) {
    if (first[i] > last[i + 1] || last[i + 1] == 0 || first[i] == 0) sum++;
  }
  for (int i = 1; i <= n - 1; ++i) {
    if (first[i] > last[i - 1] || first[i] == 0 || last[i - 1] == 0) sum++;
  }
  cout << sum << endl;
}
