#include <bits/stdc++.h>
using namespace std;
signed main() {
  int n, k;
  cin >> n >> k;
  vector<int> arr(k);
  for (int i = 0; i < k; i++) {
    cin >> arr[i];
  }
  multiset<int> pref;
  set<pair<int, int> > ans;
  for (int i = 0; i < k; i++) {
    pref.insert(arr[i]);
  }
  vector<int> used(n);
  for (auto i : pref) {
    used[i - 1] = 1;
  }
  for (int i = 0; i < n; i++) {
    if (used[i]) {
      ans.insert({i, i});
    }
  }
  for (int i = 0; i < k; i++) {
    auto it = pref.find(arr[i]);
    pref.erase(it);
    if (pref.count(arr[i] + 1) != 0) {
      ans.insert({arr[i], arr[i] + 1});
    }
    if (pref.count(arr[i] - 1) != 0) {
      ans.insert({arr[i], arr[i] - 1});
    }
  }
  int all = (n - 2) * 3 + 4;
  int aa = max(all - (int)ans.size(), 0);
  cout << aa << endl;
  return 0;
}
