#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, k;
int a[N], cnt[N], is[N];
int64_t res;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i = 1; i <= k; i++) {
    cin >> a[i];
    cnt[a[i]]++;
    is[a[i]] = 1;
  }
  res = 3 * n - 2;
  if (n <= 2) res--;
  for (int i = 1; i <= k; i++) {
    cnt[a[i]]--;
    if (is[a[i]]) {
      is[a[i]] = 0;
      res--;
    } else
      continue;
    if (cnt[a[i] - 1] > 0) res--;
    if (cnt[a[i] + 1] > 0) res--;
  }
  if (res < 0) res = 0;
  cout << res;
  return 0;
}
