#include <bits/stdc++.h>
using namespace std;
const int size = 1e5 + 5;
const long long mod = 1000003;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, k, x, maxpos[size] = {}, minpos[size] = {}, arr[size] = {};
  cin >> n >> k;
  for (int i = 1; i <= n; i++) minpos[i] = INFINITY, maxpos[i] = -1;
  for (long long i = 1; i <= k; i++) {
    cin >> x;
    maxpos[x] = max(maxpos[x], i);
    minpos[x] = min(minpos[x], i);
    arr[x] = i;
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    if (arr[i] == 0) {
      ans++;
    }
  }
  for (int i = 1; i < n; i++) {
    if (arr[i] == 0 || arr[i + 1] == 0)
      ans++;
    else if (minpos[i] > maxpos[i + 1])
      ans++;
  }
  for (int i = n; i > 1; i--) {
    if (arr[i] == 0 || arr[i - 1] == 0)
      ans++;
    else if (minpos[i] > maxpos[i - 1])
      ans++;
  }
  cout << ans << endl;
  return 0;
}
