#include <bits/stdc++.h>
using namespace std;
int arr[100100];
bool ada[100100];
map<pair<int, int>, int> mp;
int main() {
  int n, i, j, k, m, x, y, ans, curr, temp, res;
  scanf("%d %d", &n, &k);
  long long int rose = 0;
  int first;
  int last;
  for (i = 1; i <= k; i++) {
    scanf("%d", &arr[i]);
    ada[arr[i]] = 1;
    if (arr[i] > 1) {
      if (ada[arr[i] - 1] == 1) mp[make_pair(arr[i] - 1, arr[i])] = 1;
    }
    if (arr[i] < n) {
      if (ada[arr[i] + 1] == 1) mp[make_pair(arr[i] + 1, arr[i])] = 1;
    }
  }
  for (i = 1; i <= n; i++) {
    if (ada[i] == 0) rose++;
    rose += (i > 1);
    rose += (i < n);
  }
  for (auto x : mp) {
    rose--;
  }
  printf("%lld\n", rose);
  return 0;
}
