#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("tune=native")
using namespace std;
const int DEBUG = 0;
mt19937 gen(
    (unsigned)chrono::high_resolution_clock::now().time_since_epoch().count());
#pragma comment(linker, "/STACK:67108864")
int r[50][50][2];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.setf(cout.fixed);
  cout.precision(8);
  int n, q;
  cin >> n >> q;
  vector<int> ask1(n, -1);
  vector<int> ask2(n, -1);
  vector<int> cnt(n, 0);
  for (int i = 0; i < q; i++) {
    int x;
    cin >> x;
    --x;
    if (ask1[x] == -1) ask1[x] = i;
    ask2[x] = i;
    cnt[x]++;
  }
  int res = 0;
  for (int i = 0; i < n; i++)
    for (int j = i - 1; j <= i + 1; j++)
      if (j >= 0 && j < n) {
        if (i == j) {
          if (ask1[j] == -1) res++;
        } else {
          if (ask1[i] > ask1[j] && cnt[j] == 1)
            res++;
          else if (ask1[j] == -1)
            res++;
          else if ((ask1[i] == -1 ? 1000000000 : ask1[i]) > ask2[j])
            res++;
        }
      }
  cout << res;
  return 0;
}
