#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
using namespace chrono;
long long int number_of_numbers_between_l_and_r_div_by_k(long long int l,
                                                         long long int r,
                                                         long long int k) {
  long long int n = (r + k) / k - (l - 1 + k) / k;
  return n;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
unsigned long long power(unsigned long long x, int y, int p) {
  unsigned long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int a[3 * 100005];
long long int n;
int hill(long long int i) {
  if (i == 0 || i == n - 1) {
    return 0;
  }
  if (a[i] > a[i + 1] && a[i] > a[i - 1]) {
    return 1;
  }
  return 0;
}
int valley(long long int i) {
  if (i == 0 || i == n - 1) {
    return 0;
  }
  if (a[i] < a[i + 1] && a[i] < a[i - 1]) {
    return 1;
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  auto start1 = high_resolution_clock::now();
  long long int t, i, j, x, y, z, m, p, k, l;
  cin >> n >> k;
  long long int a[k];
  long long int first[n + 1];
  long long int last[n + 1];
  map<long long int, long long int> mp;
  for (j = 1; j <= n; j++) {
    first[j] = -1;
    last[j] = k;
  }
  for (i = 0; i < k; i++) {
    cin >> a[i];
    mp[a[i]] = 1;
    if (first[a[i]] == -1) {
      first[a[i]] = i;
    }
    last[a[i]] = i;
  }
  y = 0;
  for (j = 1; j <= n; j++) {
    if (mp[j] == 0) {
      y++;
    }
  }
  for (i = 1; i < n; i++) {
    if (first[i] == -1 || first[i + 1] == -1) {
      y++;
      y++;
      continue;
    }
    if (first[i] > last[i + 1]) {
      y++;
    }
    if (first[i + 1] > last[i]) {
      y++;
    }
  }
  cout << y;
  auto stop1 = high_resolution_clock::now();
  auto duration = duration_cast<microseconds>(stop1 - start1);
}
