#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  long long a[k];
  for (long long i = 0; i < k; i++) {
    cin >> a[i];
    a[i]--;
  }
  long long first[100100], last[100100];
  for (long long i = 0; i < 100100; i++) {
    first[i] = INT_MAX;
    last[i] = INT_MIN;
  }
  for (long long i = 0; i < k; i++) {
    first[a[i]] = min(first[a[i]], i);
    last[a[i]] = max(last[a[i]], i);
  }
  for (long long i = 0; i < n; i++) {
  }
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    for (long long j = i - 1; j <= i + 1; j++) {
      if (j < 0 || j >= n) continue;
      if (first[j] > last[i]) {
        ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
