#include <bits/stdc++.h>
using namespace std;
long long n, k, firstpoz[200001], lastpoz[200001], ans;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i = 1; i <= k; i++) {
    long long x;
    cin >> x;
    if (firstpoz[x] == 0) firstpoz[x] = i;
    lastpoz[x] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (firstpoz[i] == 0) ans++;
    int nr1 = i;
    int nr2 = i - 1;
    if (nr2 > 0) {
      if (firstpoz[nr1] == 0 || firstpoz[nr2] == 0)
        ans++;
      else {
        if (!(firstpoz[nr1] < lastpoz[nr2])) ans++;
      }
    }
    nr2 = i + 1;
    if (nr2 <= n) {
      if (firstpoz[nr1] == 0 || firstpoz[nr2] == 0)
        ans++;
      else {
        if (!(firstpoz[nr1] < lastpoz[nr2])) ans++;
      }
    }
  }
  cout << ans;
  return 0;
}
