#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  unordered_map<int, int> m;
  map<int, int> v;
  int arr[k + 5];
  for (int i = 0; i < k; ++i) {
    cin >> arr[i];
    m[arr[i]]++;
    v.insert(make_pair(arr[i], i));
  }
  long long a = 0;
  a = n * 3LL;
  a -= 2;
  a -= v.size();
  if (n == 1) {
    a = 0;
    cout << a << '\n';
    return 0;
  }
  bool visited[100005];
  memset(visited, false, sizeof visited);
  for (int i = 0; i < k; ++i) {
    if (visited[arr[i]]) {
      m[arr[i]]--;
      continue;
    }
    if (m[arr[i] - 1]) a--;
    if (m[arr[i] + 1]) a--;
    m[arr[i]]--;
    visited[arr[i]] = true;
  }
  cout << a << '\n';
}
