#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long n, k;
  cin >> n >> k;
  long result = 3 * n - 2;
  long arr[n][2];
  long hash[n];
  for (long i = 0; i < n; i++) {
    hash[i] = 0;
    arr[i][0] = 1;
    arr[i][1] = 1;
  }
  long val[k];
  for (long i = 0; i < k; i++) {
    cin >> val[i];
    if (!hash[val[i] - 1]) {
      result--;
      hash[val[i] - 1] = 1;
    }
  }
  for (long i = 0; i < n; i++) hash[i] = 0;
  for (long i = 0; i < k; i++) {
    long curr = val[i] - 1;
    if (curr - 1 >= 0 && hash[curr - 1]) {
      if (arr[curr][0]) {
        arr[curr][0] = 0;
        result--;
      }
    }
    if (curr + 1 < n && hash[curr + 1]) {
      if (arr[curr][1]) {
        arr[curr][1] = 0;
        result--;
      }
    }
    hash[curr] = 1;
  }
  cout << result << endl;
  return 0;
}
