#include <bits/stdc++.h>
template <class T>
using pt = std::pair<T, T>;
using namespace std;
map<int, pt<int>> a;
bool prot(int start, int ind) {
  if (a.count(ind)) {
    if (a.count(start) && a[start].first < a[ind].second) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int st = clock();
  int n, k, z;
  cin >> n >> k;
  for (int i = 0; i < k; i++) {
    cin >> z;
    if (a[z].first == 0 && a[z].second == 0) {
      a[z].first = i + 1;
      a[z].second = i + 1;
    }
    if (a[z].first > i + 1)
      a[z].first = i + 1;
    else if (a[z].second < i + 1)
      a[z].second = i + 1;
  }
  long long ans = 0;
  if (n == 1) {
    if (a.count(z))
      cout << 0;
    else
      cout << 1;
    return 0;
  }
  if (n == 2) goto flag;
  for (int i = 2; i < n; i++) {
    z = 3;
    if (a.count(i)) z--;
    if (!prot(i, i - 1)) z--;
    if (!prot(i, i + 1)) z--;
    ans += z;
  }
  z = 2;
  if (a.count(1)) z--;
  if (!prot(1, 2)) z--;
  ans += z;
  z = 2;
flag:
  if (a.count(n)) z--;
  if (!prot(n, n - 1)) z--;
  ans += z;
  cout << ans;
  return 0;
}
