#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout.precision(10);
  cout << fixed;
  int n, k;
  cin >> n >> k;
  int result = 3 * n - 2;
  vector<int> a(k), cnt1(n + 1), cnt2(n + 1);
  for (int i = 0; i < k; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < k; i++) {
    if (cnt1[a[i] - 1] == 1) {
      result--;
      cnt1[a[i] - 1] = -1;
    }
    if (cnt1[a[i]] == 0) {
      cnt1[a[i]] = 1;
    }
  }
  for (int i = k - 1; i >= 0; i--) {
    if (cnt2[a[i] - 1] == 1) {
      result--;
      cnt2[a[i] - 1] = -1;
    }
    if (cnt2[a[i]] == 0) {
      cnt2[a[i]] = 1;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (cnt1[i] || cnt2[i]) {
      result--;
    }
  }
  cout << result << "\n";
  return 0;
}
