#include <bits/stdc++.h>
using namespace std;
const int N = 100000;
int p[N], u[N];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= k; i++) {
    int x;
    cin >> x;
    if (p[x] == 0) p[x] = i;
    u[x] = i;
  }
  long long rez = 0;
  for (int i = 1; i <= n; i++) {
    if (p[i] == 0) {
      if (i == 1 || i == n)
        rez += 2;
      else
        rez += 3;
    } else {
      if (i < n && (p[i] > u[i + 1])) rez++;
      if (i > 1 && (p[i] > u[i - 1])) rez++;
    }
  }
  cout << rez;
  return 0;
}
