#include <bits/stdc++.h>
using namespace std;
int n, k;
int a[500000 + 9];
int main() {
  cin >> n >> k;
  map<int, int> cnt, type, ok;
  for (int i = 0; i < k; i++) {
    cin >> a[i];
    a[i]--;
    ok[a[i]] = 1;
  }
  for (int i = k - 1; i >= 0; i--) {
    cnt[a[i]]++;
    type[a[i]] = 0;
    if (cnt[a[i] + 1] == 0 && a[i] + 1 < n) {
      type[a[i]]++;
    }
    if (cnt[a[i] - 1] == 0 && a[i] - 1 >= 0) {
      type[a[i]]++;
    }
  }
  int sum = 0;
  for (int i = 0; i < n; i++) {
    if (!ok[i]) {
      if (i + 1 >= 0 && i + 1 < n) {
        sum++;
      }
      if (i - 1 >= 0 && i - 1 < n) {
        sum++;
      }
      sum++;
    } else {
      sum += type[i];
    }
  }
  cout << sum;
  return 0;
}
