#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, k;
  cin >> n >> k;
  long long int A[k];
  map<long long int, pair<long long int, long long int> > pos;
  for (long long int i = 1; i <= n; i += 1) {
    pos[i].first = std::numeric_limits<long long int>::max();
    pos[i].second = std::numeric_limits<long long int>::min();
  }
  for (long long int i = 1; i <= k; i += 1) {
    cin >> A[i];
    pos[A[i]].first = min(pos[A[i]].first, i);
    pos[A[i]].second = max(pos[A[i]].second, i);
  }
  if (n == 1) {
    if (pos[1].first == std::numeric_limits<long long int>::max())
      cout << "1";
    else
      cout << "0";
    return 0;
  }
  long long int c = 0;
  for (long long int i = 1; i <= n; i += 1) {
    if (i != 1 && i != n) {
      if (pos[i].first == std::numeric_limits<long long int>::max()) {
        c += 3;
      } else {
        if (pos[i - 1].first == std::numeric_limits<long long int>::max() ||
            pos[i - 1].second < pos[i].first)
          c += 1;
        if (pos[i + 1].first == std::numeric_limits<long long int>::max() ||
            pos[i + 1].second < pos[i].first)
          c += 1;
      }
    } else {
      if (i == 1) {
        if (pos[i].first == std::numeric_limits<long long int>::max()) {
          c += 2;
        } else {
          if (pos[i + 1].first == std::numeric_limits<long long int>::max() ||
              pos[i + 1].second < pos[i].first)
            c += 1;
        }
      } else {
        if (pos[i].first == std::numeric_limits<long long int>::max()) {
          c += 2;
        } else {
          if (pos[i - 1].first == std::numeric_limits<long long int>::max() ||
              pos[i - 1].second < pos[i].first)
            c += 1;
        }
      }
    }
  }
  cout << c;
  return 0;
}
