#include <bits/stdc++.h>
using namespace std;
int n, k, x, ans;
int a[100005], b[100005], c[100005], d[100005];
int main() {
  cin >> n >> k;
  for (int i = 1; i <= k; i++) {
    cin >> b[i];
    a[b[i]]++;
  }
  for (int i = 1; i <= k; i++) {
    if (c[b[i]] == 0) {
      c[b[i]] = i;
    }
  }
  for (int i = k; i >= 1; i--) {
    if (d[b[i]] == 0) {
      d[b[i]] = i;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] == 0) ans++;
    if (i - 1 > 0) {
      if (a[i - 1] == 0 && a[i] == 0)
        ans++;
      else if (a[i - 1] == 0 && a[i] != 0)
        ans++;
      else if (a[i - 1] != 0 && a[i] == 0)
        ans++;
      else {
        if (d[i - 1] < c[i]) ans++;
      }
    }
    if (i + 1 <= n) {
      if (a[i + 1] == 0 && a[i] == 0)
        ans++;
      else if (a[i + 1] == 0 && a[i] != 0)
        ans++;
      else if (a[i + 1] != 0 && a[i] == 0)
        ans++;
      else {
        if (d[i + 1] < c[i]) ans++;
      }
    }
  }
  cout << ans;
  return 0;
}
