#include <bits/stdc++.h>
using namespace std;
using Int = long long;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  Int n;
  int k;
  cin >> n >> k;
  multiset<int> ms;
  vector<int> ar(k);
  Int res = n + (2 * (n - 1));
  int d = 0;
  for (int i = 0; i < k; ++i) {
    cin >> ar[i];
    if (!ms.count(ar[i])) {
      d++;
    }
    ms.insert(ar[i]);
  }
  res -= d;
  42;
  set<pair<int, int>> bad;
  for (int i = 0; i < k; ++i) {
    ms.erase(ms.find(ar[i]));
    if (ms.count(ar[i] - 1)) {
      bad.insert({ar[i], ar[i] - 1});
    }
    if (ms.count(ar[i] + 1)) {
      bad.insert({ar[i], ar[i] + 1});
    }
  }
  res -= (int)bad.size();
  cout << res << '\n';
  return 0;
}
