#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, m, cant, i;
  unordered_map<int, int> max;
  unordered_map<int, int> min;
  cin >> n >> k;
  for (i = 0; i < k; i++) {
    cin >> m;
    if (min.find(m) == min.end()) {
      max.insert(make_pair(m, i + 1));
      min.insert(make_pair(m, i + 1));
    } else {
      max.erase(m);
      max.insert(make_pair(m, i + 1));
    }
  }
  cant = 0;
  if (n > 1) {
    i = 1;
    if (min.find(i) == min.end())
      cant += 2;
    else if (min.find(i + 1) == min.end() ||
             max.find(i + 1)->second < min.find(i)->second)
      cant++;
    i = n;
    if (min.find(i) == min.end())
      cant += 2;
    else if (min.find(i - 1) == min.end() ||
             max.find(i - 1)->second < min.find(i)->second)
      cant++;
    for (i = 2; i < n; i++)
      if (min.find(i) == min.end())
        cant += 3;
      else {
        if (min.find(i - 1) == min.end() ||
            max.find(i - 1)->second < min.find(i)->second)
          cant++;
        if (min.find(i + 1) == min.end() ||
            max.find(i + 1)->second < min.find(i)->second)
          cant++;
      }
  }
  cout << cant << "\n";
}
