#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n, k;
  cin >> n >> k;
  unordered_map<int, bool> was;
  vector<int> x(k);
  for (int i = 0; i < k; i++) {
    cin >> x[i];
  }
  set<pair<int, int>> s;
  for (int i = 0; i < k; i++) {
    if (was[x[i] - 1]) {
      s.insert(make_pair(x[i] - 1, x[i]));
    }
    if (was[x[i] + 1]) {
      s.insert(make_pair(x[i] + 1, x[i]));
    }
    s.insert(make_pair(x[i], x[i]));
    was[x[i]] = true;
  }
  cout << 2 * (n - 1) + n - (int)s.size() << endl;
  return 0;
}
