#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
int n, k;
int x[N];
int fi[N], li[N];
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    fi[i] = -1;
    li[i] = -1;
  }
  for (int i = 1; i <= k; i++) {
    cin >> x[i];
    if (fi[x[i]] == -1) fi[x[i]] = i;
    li[x[i]] = i;
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    if (i == 1 || i == n) {
      if (i == 1) {
        if (fi[1] == -1) ans++;
        if ((fi[1] > li[2] || fi[1] == -1) && 2 <= n) ans++;
      }
      if (i == n && n != 1) {
        if (fi[n] == -1) ans++;
        if ((fi[n] > li[n - 1] || fi[n] == -1) && n - 1 >= 1) ans++;
      }
    } else {
      if (fi[i] == -1) ans++;
      if (fi[i] > li[i - 1] || fi[i] == -1) ans++;
      if (fi[i] > li[i + 1] || fi[i] == -1) ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
