#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  set<pair<int, int>> s;
  for (int i = 1; i < n + 1; i++) {
    s.insert(make_pair(i, i - 1));
    s.insert(make_pair(i, i + 1));
    s.insert(make_pair(i, i));
  }
  s.erase(make_pair(1, 0));
  s.erase(make_pair(n, n + 1));
  int a[k], h[100005] = {0};
  for (int i = 0; i < k; i++) cin >> a[i], h[a[i]]++;
  for (int i = 0; i < k; i++) {
    s.erase(make_pair(a[i], a[i]));
    if (h[a[i] + 1] > 0) s.erase(make_pair(a[i], a[i] + 1));
    if (h[a[i] - 1] > 0) s.erase(make_pair(a[i], a[i] - 1));
    h[a[i]]--;
  }
  cout << s.size() << endl;
}
