#include <bits/stdc++.h>
using namespace std;
int q[100000];
bool a[100001][3];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) a[i][0] = a[i][1] = a[i][2] = true;
  a[1][0] = false;
  a[n][2] = false;
  for (int i = 0; i < k; i++) {
    cin >> q[i];
  }
  int answer = 0;
  for (int i = 0; i < k; i++) {
    if (a[q[i]][1]) {
      a[q[i] - 1][2] = true;
      a[q[i] + 1][0] = true;
    }
    a[q[i]][0] = false;
    a[q[i]][2] = false;
    a[q[i]][1] = false;
  }
  for (int i = 1; i <= n; i++) {
    if (a[i][1]) {
      a[i - 1][2] = true;
      a[i + 1][0] = true;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (a[i][0]) {
      answer++;
    }
    if (a[i][1]) {
      answer++;
    }
    if (a[i][2]) {
      answer++;
    }
  }
  cout << answer;
  return 0;
}
